Controlling a video content system by computing a frame quality score

ABSTRACT

According to examples of the presently disclosed subject matter, a method of controlling a video content system can include: obtaining a current input frame and a preceding input frame from an input video sequence and obtaining a current degraded frame and a preceding degraded frame from a degraded video sequence corresponding to the input video sequence; computing a first differences value from the current input and the preceding input frames and a second differences value from the current degraded frame and the preceding degraded frame, comparing the first and second differences values, giving rise to an inter-frame quality score; computing an intra-frame quality score using an intra-frame quality measure that is applied in the pixel-domain of the current degraded frame and the current input frame and providing a configuration instruction to the video content system based on a quality criterion related to the inter-frame and the intra-frame quality scores.

FIELD OF THE INVENTION

The present invention is in the field of video content system controland configuration.

SUMMARY OF THE INVENTION

Many of the functional components of the presently disclosed subjectmatter can be implemented in various forms, for example, as hardwarecircuits comprising custom VLSI circuits or gate arrays, or the like, asprogrammable hardware devices such as FPGAs or the like, or as asoftware program code stored on an intangible computer readable mediumand executable by various processors, and any combination thereof. Aspecific component of the presently disclosed subject matter can beformed by one particular segment of software code, or by a plurality ofsegments, which can be joined together and collectively act or behaveaccording to the presently disclosed limitations attributed to therespective component. For example, the component can be distributed overseveral code segments such as objects, procedures, and functions, andcan originate from several programs or program files which operate inconjunction to provide the presently disclosed component.

In a similar manner, a presently disclosed component(s) can be embodiedin operational data or operation data can be used by a presentlydisclosed component(s). By way of example, such operational data can bestored on tangible computer readable medium. The operational data can bea single data set, or it can be an aggregation of data stored atdifferent locations, on different network nodes or on different storagedevices.

The method or apparatus according to the subject matter of the presentapplication can have features of different aspects described above orbelow, or their equivalents, in any combination thereof, which can alsobe combined with any feature or features of the method or apparatusdescribed in the Detailed Description presented below, or theirequivalents.

Examples of the presently disclosed subject matter relate to a methodand a device for controlling a video content system based on an inputvideo sequence and a corresponding degraded video sequence. The inputvideo sequence can include at least a current input frame and apreceding input frame, and the degraded video sequence can include atleast a current degraded frame and a preceding degraded frame. Themethod of controlling a video content system based on an input videosequence and a corresponding degraded video sequence can include:obtaining the current input frame, the preceding input frame, thecurrent degraded frame and the preceding degraded frame; computing afirst differences value from the current input and the preceding inputframes and a second differences value from the current degraded frameand the preceding degraded frame; comparing the first and seconddifferences values giving rise to an inter-frame quality score;computing an intra-frame quality score using an intra-frame qualitymeasure that can be applied in the pixel-domain of the current degradedframe and the current input frame; and providing a configurationinstruction to the video content system based on a quality criterionrelated to the inter-frame and the intra-frame quality scores.

According to examples of the presently disclosed subject matter, thedegraded video sequence can be a compressed video sequence correspondingto the input video sequence, and the method can include: providing acompression parameter value, and wherein: obtaining includes, obtaininga candidate compressed frame generated from a current input frameaccording to the compression parameter value and for each current inputframe and candidate compressed frame providing a stored compressed framecorresponding to the preceding input frame, and wherein computing afirst differences value includes computing a first differences valuefrom the current input and the preceding input frames, and whereincomputing a second differences value includes computing a seconddifferences value from the candidate compressed frame and the storedcompressed frame, and comparing the first and second differences valuesgiving rise to an inter-frame quality score, and wherein computing anintra-frame quality score includes computing an intra-frame qualityusing an intra-frame quality measure that can be applied in thepixel-domain of the candidate compressed frame and the current inputframe, and wherein in case a quality criterion related to inter-frameand intra-frame quality is not satisfied, instructing the video encoderto repeat a compression process using an updated compression parametervalue, giving rise to an updated candidate compressed frame andcomputing the inter-frame quality score and the intra-frame qualityscore based on the updated candidate compressed frame.

According to examples of the presently disclosed subject matter, themethod can further include computing a frame quality score for thecurrent candidate compressed frame based on the intra-frame and theinter-frame quality scores, and wherein the quality criterion can berelated to the frame quality score.

According to examples of the presently disclosed subject matter, themethod can further include partitioning each of the current input frame,the preceding input frame, the candidate compressed frame and the storedcompressed frame into corresponding tiles; calculating an intra-tile andan inter-tile quality scores for each set of corresponding tiles;computing perceptually driven weights for the intra-tile and theinter-tile quality scores; and pooling the tile scores giving rise tothe frame quality score.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can further include using afull-reference pixel-domain quality measure, wherein the input frame canbe the pixel domain reference.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can include computing anintra-frame quality score based on a pixel-wise difference between theinput frame and the candidate compressed frame.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can further include normalizingthe intra-frame quality score based on a brightness parameter value ofpixels in either the candidate compressed frame or the input frame.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can further include: partitioninga current input frame tile and a corresponding candidate compressedframe tile, giving rise to a plurality of sub-tile pairs; computing anintra sub-tile quality score for each one of the plurality of sub-tilepairs; computing a perceptually driven weight for each one of theplurality of sub-tile pairs giving rise to a plurality of weighted intrasub-tile quality scores; and pooling the plurality of weighted intrasub-tile quality scores into a corresponding plurality of intra-tilequality scores.

According to examples of the presently disclosed subject matter,computing an inter-frame quality score can include: partitioning eachtile from a set of corresponding tiles consisting of: a current inputframe tile, a preceding frame tile, a candidate compressed frame tileand a stored compressed frame tile into two or more sub-tiles, givingrise to two or more sub-tile groups; computing an inter sub-tile scorefor each of the two or more sub-tile groups; and pooling the two or moreinter sub-tile scores into a corresponding inter-frame tile qualityscore.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can include, calculating an addedartifactual edges score that can be based on quantifying an extent ofadded artifactual edges along a video coding block boundary of thecandidate compressed frame relative to the current input frame, whereinthe extent of added artifactual edges can be determined according to abehavior of pixel values across video coding block boundaries inrelation to a behavior of pixel values on either side of respectivevideo coding block boundaries.

According to examples of the presently disclosed subject matter,calculating an added artifactual edges score further can include,normalizing the added artifactual edges score according to anartifactual edges normalization factor that can be based on thebrightness parameter value and on a distribution of the extent of addedartifactual edges.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score further can include, calculatinga texture distortion score based on relations between texture values inthe current input frame and in the corresponding candidate compressedframe, each texture value corresponding to a variance of pixel valueswithin each one of a plurality of predefined pixel groups in the currentinput frame and in each respective pixel group in the correspondingcandidate compressed frame.

According to examples of the presently disclosed subject mattercalculating a texture distortion score can include applying one or moretexture distortion sensitivity thresholds to the relations betweentexture values in the current input frame and in the correspondingcandidate compressed frame, giving rise to a non-linear texturedistortion score mapping that can be based on the texture distortionsensitivity thresholds.

According to examples of the presently disclosed subject matter,applying one or more texture distortion sensitivity thresholds caninclude adapting the one or more texture distortion sensitivitythresholds according to the calculated pixel-wise differences.

According examples of the presently disclosed subject matter,calculating a texture distortion score can further include, normalizingthe texture distortion score according to the brightness parameter valueand according to the artifactual edges normalization factor.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can further include: obtaining anedge map corresponding to the current input frame; for each edge pixelin the current input frame providing an edge strength score based on adeviation between a value of an edge pixel and one or more pixels in theproximity of the edge pixel; for each corresponding pixel in thecandidate compressed frame providing an edge strength score based on adeviation between a value of the corresponding pixel and one or morepixels in the proximity of the corresponding pixel; and calculating anedge loss score based on a relation among the edge strength score of theedge pixel and the edge strength score of the corresponding pixel.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can include: obtaining an edgemap corresponding to the current input frame; obtaining an edge mapcorresponding to the candidate compressed frame; and calculating an edgeloss score based on a loss of edge pixels according to a differencebetween the edge map corresponding to the current input frame and theedge map corresponding to the candidate compressed frame.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can include factoring theintra-frame quality score based on a spatial distribution of pixeldomain differences among the current input frame and the candidatecompressed frame.

According to examples of the presently disclosed subject matter,computing an intra-frame quality score can includes: for each candidatecompressed frame tile, computing a tile spatial distribution score basedon a distribution among the pixel difference scores of the correspondingsub-tile pairs; for the candidate compressed frame, pooling the tilespatial distribution scores, giving rise to a frame spatial distributionscore; and factoring the intra-frame quality score according to theframe spatial distribution score.

According to examples of the presently disclosed subject matter,providing a configuration instruction can include providing aconfiguration parameter that can be related to a respective operation orasset of the video content system.

According to examples of the presently disclosed subject matter,providing a configuration instruction can include providing anindication with regard to an extent of modification that is to beapplied to the configuration of a respective operation or asset of thevideo content system.

According to a further aspect of the currently disclosed subject matter,there is provided a device for controlling a video content system basedon an input video sequence and a corresponding degraded video sequence.The input video sequence including at least a current input frame and apreceding input frame, and the degraded video sequence including atleast a current degraded frame and a preceding degraded frame. Accordingto examples of the presently disclosed subject matter, the device forcontrolling a video content system based on an input video sequence anda corresponding degraded video sequence can include: an interfaceconfigured to receive as input each of the current input frame, thepreceding input frame, the current degraded frame and the precedingdegraded frame; a processor configured to compute a first differencesvalue from the current input frame and the preceding input frame, and asecond differences value from the current degraded frame and thepreceding degraded frame; a quality degradation evaluation moduleadapted to compare the first and the second differences values, givingrise to an inter-frame quality score; the compression quality evaluationmodule can be adapted to compute an intra-frame quality score using anintra-frame quality measure that can be applied in the pixel-domain ofthe current input frame and the current degraded frame; and a videocontent system configurator, configured to provide a configurationinstruction to the video content system based on a quality criterionrelated to the inter-frame and the intra-frame quality scores.

According to examples of the presently disclosed subject matter, thedegraded video sequence can be a compressed video sequence correspondingto the input video sequence, and the device can include: a bufferadapted to hold a preceding input frame and a preceding compressed framecorresponding to the preceding input frame, and wherein: the videocontent system configurator can be adapted to instruct a video encoderto compress the current input frame according to a compression parametervalue, giving rise to a candidate compressed frame; the interface can beadapted to receive the current input frame and the candidate compressedframe, the processor can be configured to compute a first differencesvalue from the current input frame and preceding input frame, and asecond differences value from the candidate compressed frame and thepreceding compressed frame, the quality degradation evaluation modulecan be adapted to compute an intra-frame quality score using anintra-frame quality measure that can be applied in the pixel-domain forthe candidate compressed frame and the current input frame, and thequality degradation evaluation module can be adapted to compare thefirst and second differences values giving rise to an inter-framequality score, wherein in case a quality criterion related tointer-frame and intra-frame quality scores is not satisfied, the a videocontent system configurator can be adapted to instruct the video encoderto repeat the video compression of the current input frame using anupdated compression parameter value, giving rise to an updated candidatecompressed frame and computing the inter-frame quality score and theintra-frame quality score based on the updated candidate compressedframe.

According to examples of the presently disclosed subject matter, theprocessor can be further adapted to compute a frame quality score forthe current input frame based on the intra-frame and the inter-framequality scores, and wherein the quality criterion can be related to theframe quality score.

According to examples of the presently disclosed subject matter, thedevice can include a frame partitioning module adapted to partition eachof the current input frame, the preceding input frame, the candidatecompressed frame and the stored compressed frame into two or more tiles,and wherein the processor can be adapted to: calculate an intra-tile andan inter-frame quality score for each set of corresponding tiles;compute perceptually driven weights for the intra-tile and theinter-tile quality scores; and pool tile scores, giving rise to theframe quality score.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to use afull-reference pixel-domain quality measure to compute the intra-framequality score, wherein the input frame can be a pixel domain reference.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to compute theintra-frame quality score based on a pixel-wise difference between theinput frame and the candidate compressed frame.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to normalize theintra-frame quality score based on a brightness parameter value ofpixels in either the candidate compressed frame or the input frame.

According to examples of the presently disclosed subject matter, thedevice can include a partitioning module that can be adapted topartition a current input frame tile and a corresponding candidatecompressed frame tile, giving rise to a plurality of sub-tile pairs, andwherein the quality degradation evaluation module can be adapted to:compute an intra sub-tile quality score for each one of the plurality ofsub-tile pairs; compute a perceptually driven weight for each one of theplurality of sub-tile pairs giving rise to a plurality of weighted intrasub-tile quality scores; and pool the plurality of weighted intrasub-tile quality scores into a corresponding plurality of intra-tilequality scores.

According to examples of the presently disclosed subject matter, thedevice can further include a partitioning module that can be adapted topartition each tile from a set of corresponding tiles consisting of: acurrent input frame tile, a preceding input frame tile, a candidatecompressed frame tile and a stored compressed frame tile into two ormore sub-tiles, giving rise to two or more sub-tile sets, and wherein,the quality degradation evaluation module can be adapted to: compute aninter sub-tile score for each of the two or more sub-tile sets; and poolthe two or more inter sub-tile scores into a corresponding inter-frametile quality score.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to calculate anadded artifactual edges score that can be based on quantifying an extentof added artifactual edges along a video encoding coding block boundaryof the candidate compressed frame relative to the current input frame,wherein the extent of added artifactual edges can be determinedaccording to a behavior of pixel values across video coding blockboundaries in relation to a behavior of pixel values on either side ofrespective video coding block boundaries, and wherein the intra-framequality score can be associated with the calculated added artifactualedges score.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to normalize theadded artifactual edges score according to an artifactual edgesnormalization factor that can be based on the brightness parameter valueand on a distribution of the extent of added artifactual edges.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to compute atexture distortion score based on relations between texture values inthe current input frame and in the corresponding candidate compressedframe, each texture value corresponding to a variance of pixel valueswithin each one of a plurality of predefined pixel groups in the currentinput frame and in each respective pixel group in the correspondingcandidate compressed frame, and wherein the intra-frame quality scorecan be associated with the calculated texture distortion score.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to apply one ormore texture distortion sensitivity thresholds to the relations betweentexture values in the current input frame and in the correspondingcandidate compressed frame, giving rise to a non-linear texturedistortion score mapping that can be based on the texture distortionsensitivity thresholds, and wherein the texture distortion score can beassociated with the non-linear texture distortion score mapping.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to adapt the one ormore texture distortion sensitivity thresholds according to thecalculated pixel-wise differences.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to normalize thetexture distortion score according to the brightness parameter value andaccording to the artifactual edges normalization factor.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to: obtain an edgemap corresponding to the current input frame; obtain an edge mapcorresponding to the candidate compressed frame; and calculate an edgeloss score based on a loss of edge pixels according to a differencebetween the edge map corresponding to the current input frame and theedge map corresponding to the candidate compressed frame.

According to examples of the presently disclosed subject matter35, thequality degradation evaluation module can be adapted to factor theintra-frame quality score based on a spatial distribution of pixeldomain differences among the current input frame and the candidatecompressed frame.

According to examples of the presently disclosed subject matter, thequality degradation evaluation module can be adapted to: compute a tilespatial distribution score for each candidate compressed frame tilebased on a distribution among the pixel difference scores of thecorresponding sub-tile pairs; pool the tile spatial distribution scoresfor the candidate compressed frame, giving rise to a frame spatialdistribution score; and factor the intra-frame quality score accordingto the frame spatial distribution score.

According to some examples of the presently disclosed subject matter20,the video content system configurator can be adapted to provide aconfiguration instruction which includes a configuration parameter thatcan be related to a respective operation or asset of the video contentsystem.

According to examples of the presently disclosed subject matter, theconfiguration instruction indicates an extent of modification that is tobe applied to the configuration of a respective operation or asset ofthe video content system.

According to a further aspect of the currently disclosed subject matterthese is provided a program storage device readable by machine, tangiblyembodying a program of instructions executable by the machine to performa method of controlling a compression of a video frame from a videosequence to compress a video frame from an input video sequence.According to examples of the presently disclosed subject matter, themethod can include: providing a compression parameter value; obtaining acandidate compressed frame generated from a current input frameaccording to the compression parameter value; for each current inputframe and candidate compressed frame providing a stored compressed framecorresponding to the preceding input frame; computing a firstdifferences value from the current input and the preceding input framesand a second differences value from the candidate compressed frame andthe stored compressed frame; comparing the first and second differencesvalue giving rise to an inter-frame quality score; computing anintra-frame quality score using an intra-frame quality measure that canbe applied in the pixel-domain of the candidate compressed frame and thecurrent input frame; and in case a quality criterion related tointer-frame and intra-frame quality is not satisfied, instructing thevideo encoder to repeat a compression process using an updatedcompression parameter value giving rise to an updated candidatecompressed frame and computing the inter-frame quality score and theintra-frame quality score based on the updated candidate compressedframe.

According to yet another aspect of the invention according to thecurrently disclosed subject matter there is provided a computer programproduct comprising a computer useable medium having computer readableprogram code embodied therein for controlling a compression of a videoframe from a video sequence to compress a video frame from an inputvideo sequence. According to examples of the presently disclosed subjectmatter, the computer program product can include: computer readableprogram code for causing the computer to provide a compression parametervalue; computer readable program code for causing the computer to obtaina candidate compressed frame generated from a current input frameaccording to the compression parameter value; computer readable programcode for causing the computer to for each current input frame andcandidate compressed frame providing a stored compressed framecorresponding to the preceding input frame; computer readable programcode for causing the computer to compute a first differences value fromthe current input and the preceding input frames and a seconddifferences value from the candidate compressed frame and the storedcompressed frame; computer readable program code for causing thecomputer to compare the first and second differences value giving riseto an inter-frame quality score; computer readable program code forcausing the computer to compute an intra-frame quality score using anintra-frame quality measure that can be applied in the pixel-domain ofthe candidate compressed frame and the current input frame; and computerreadable program code for causing the computer to in case a qualitycriterion related to inter-frame and intra-frame quality is notsatisfied, instructing the video encoder to repeat a compression processusing an updated compression parameter value giving rise to an updatedcandidate compressed frame and computing the inter-frame quality scoreand the intra-frame quality score based on the updated candidatecompressed frame.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to understand the invention and to see how it may be carriedout in practice, a preferred embodiment will now be described, by way ofnon-limiting example only, with reference to the accompanying drawings,in which:

FIG. 1 is a block diagram illustration of a device for controlling acompression of a video frame from a video sequence, according toexamples of the presently disclosed subject matter;

FIG. 2 is a flowchart illustration of a method of controlling acompression of a video frame from a video sequence, according toexamples of the presently disclosed subject matter;

FIG. 3 is a flowchart illustration of the method of controlling acompression of a video frame shown in FIG. 2 with the addition of tilingprocessing;

FIG. 4 is a flowchart illustration of a full-reference pixel-domainquality measure computation which can be implemented as part of a methodof controlling a compression of a video frame, according to examples ofthe presently disclosed subject matter;

FIG. 5 is a flowchart illustration of a temporal consistency qualitymeasure computation which can be implemented as part of a method ofcontrolling a compression of a video frame, according to examples of thepresently disclosed subject matter;

FIG. 6 is a graphical illustration of the pixel values of two blockssharing a common (vertical) block boundary;

FIG. 7 is a schematic illustration of a thresholding function which canbe used as part an added artifactual edges measure that can be used aspart of a method of controlling a compression of a video frame,according to some examples of the presently disclosed subject matter;

FIG. 8 is a schematic illustration of a thresholding function which canbe implemented as part of a texture distortion measure that can be usedas part of a method of controlling a compression of a video frame,according to some examples of the presently disclosed subject matter;

FIG. 9A is an example of a schematic enumeration of the pixelssurrounding the pixel at {i, j};

FIG. 9B is a schematic illustration of the pixel values (edge pixel isbolded) of the pixels surrounding the pixel at {i, j}; and

FIG. 9C is a schematic illustration of the absolute differences values(maximum value is bolded) computed for the pixels surrounding the pixelat {i, j}, and which demonstrates the case for a diagonal edge, whereED_(org)(i, j)=3.

It will be appreciated that for simplicity and clarity of illustration,elements shown in the figures have not necessarily been drawn to scale.For example, the dimensions of some of the elements may be exaggeratedrelative to other elements for clarity. Further, where consideredappropriate, reference numerals may be repeated among the figures toindicate corresponding or analogous elements.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth in order to provide a thorough understanding of the presentlydisclosed subject matter. However, it will be understood by thoseskilled in the art that the presently disclosed subject matter may bepracticed without these specific details. In other instances, well-knownmethods, procedures and components have not been described in detail soas not to obscure the presently disclosed subject matter.

Unless specifically stated otherwise, as apparent from the followingdiscussions, it is appreciated that throughout the specificationdiscussions various functional terms refer to the action and/orprocesses of a computer or computing device, or similar electroniccomputing device, that manipulate and/or transform data represented asphysical, such as electronic, quantities within the computing device'sregisters and/or memories into other data similarly represented asphysical quantities within the computing device's memories, registers orother such tangible information storage, transmission or displaydevices.

Provided below is a list of conventional terms in the field of imageprocessing and in the field of digital video content systems and digitalvideo processing. For each of the terms below a short definition isprovided in accordance with each of the term's conventional meaning inthe art. The terms provided below are known in the art and the followingdefinitions are provided as a non-limiting example only for conveniencepurposes. Accordingly, the interpretation of the corresponding terms inthe claims, unless stated otherwise, is not limited to the definitionsbelow, and the terms used in the claims should be given their broadestreasonable interpretation.

Throughout the description of examples of the presently disclosedsubject matter and in the claims, reference is made to the term “videocontent system” or “digital video content system”. A video contentsystem or a digital video content system is a system that is configuredto send, receive, display or create one or more video sequences (or atleast digital data which corresponds to a video sequence). In someexamples of the presently disclosed subject matter, the video contentsystem is configured to process an input video sequence. Examples ofprocessing which can be carried out by the video content system include,but are not limited to, one or more of the following: encoding,compressing and recompressing. Still further by way of example, thevideo content system can modify various parameters of the processing ofthe video sequence, and the quality of the output (processed videosequence) can be influenced by the processing parameters that are used.

In further examples of the presently disclosed subject matter, either inaddition or as an alternative to the processing by the video contentsystem, the video content system can be configured to distribute one ormore video sequences to one or more users. Still further by way ofexample, a limited amount of resources are allocated for thedistribution of the video sequence by the video content system, and thevideo content system can cause the allocation of resources that are tobe used for distributing the video sequence to be modified.

The video content system can receive as input RAW digital data, forexample in the YUV domain, and can be configured to encode or compressthe digital data, for example, the video content system can be a videocompression system. Further by way of example, the video content systemcan receive as input an encoded or compressed video sequence and can beconfigured to decode and encode, or recompress, the encoded orcompressed input video sequence. The video content system can beconfigured to apply various encoding or compression parameters as partof the encoding or compression process, and the level of qualitydegradation that is introduced through the encoding or compressionprocess is related to the encoding or compression parameters.

The video content system can be configured to distribute the input videosequence. The video content system can be configured to process thevideo sequence to accommodate the video sequence according to the extentof resources that are allocated or that are available for thedistribution of the video sequence. The processing by the video contentsystem of the video sequence for distribution thereof can produce adegraded video sequence. The level of quality degradation introduced tothe video sequence can be related to the extent of resources that areallocated for the distribution of the video sequence.

Throughout the description of examples of the presently disclosedsubject matter and in the claims, reference is made to the term “videosequence”. A video sequence is a sequence of video frames.

Throughout the description of examples of the presently disclosedsubject matter and in the claims, reference is made to the term“degraded video sequence”. A “degraded video sequence” is a videosequence that has undergone some processing or has gone through qualitydegradation for any other reason, including for example, transmissionerrors, which reduced its perceived visual quality relative to the videosequence before the processing.

Throughout the description of examples of the presently disclosedsubject matter and in the claims, reference is made to the terms “videocompression” and “video encoding” or in short “compression” and“encoding”. Unless the text implies otherwise, the term “compression” asused herein can be interchanged with the more general term “encoding”

According to an aspect of the current disclosed subject matter, there isprovided a system, and a method of controlling a video content system.According to examples of the presently disclosed subject matter, adevice for controlling a video content system, can receive an inputvideo sequence and a corresponding degraded video sequence. The inputvideo sequence can include at least a current input frame and apreceding input frame. The degraded sequence can include at least acurrent degraded frame and a preceding degraded frame.

According to examples of the presently disclosed subject matter, thedevice for controlling a video content system can include: an interface,a processor, a quality degradation evaluation module and a video contentsystem configurator.

The interface can be configured to receive as input each of the currentinput frame, the preceding input frame, the current degraded frame andthe preceding degraded frame. The processor can be configured to computea first differences value from the current input frame and the precedinginput frame, and a second differences value from the current degradedframe and the preceding degraded frame. The quality degradationevaluation module can be adapted to compare the first and the seconddifferences values, and to provide an inter-frame quality score based onthe comparison. The quality degradation evaluation module can be adaptedto compute an intra-frame quality score using an intra-frame qualitymeasure that is applied in the pixel-domain of the current input frameand the current degraded frame. The video content system configuratorcan be configured to provide a configuration instruction to the videocontent system based on a quality criterion related to the inter-frameand the intra-frame quality scores.

Further aspects of the currently disclosed subject matter relate to amethod of a video content system based on an input video sequence and acorresponding degraded video sequence. Yet further aspects of thepresently disclosed subject matter relate to a program storage devicereadable by machine, tangibly embodying a program of instructionsexecutable by the machine to perform the method of controlling a videocontent system based on an input video sequence and a correspondingdegraded video sequence. Still further aspects of the presentlydisclosed subject matter, relate to a computer program productcomprising a computer useable medium having computer readable programcode embodied therein for controlling a video content system based on aninput video sequence and a corresponding degraded video sequence.

According to examples of the presently disclosed subject matter, thecontrol over the video content system is carried out according thequality of the degraded video sequence. The quality of the degradedvideo sequence is measured by a perceptual quality measure. Examples ofperceptual quality measures which can be used for evaluating the qualityof the degraded video sequence are disclosed herein. The degraded videosequence can be a candidate for output or distribution. The degradedvideo sequence can be buffered pending output or distribution, and theprovisioning or distribution thereof can be contingent upon the qualitycriterion, evaluated by the device for controlling a video system,meeting the quality criterion implemented by the device. In a furtherexample, certain aspects of the processing (e.g., encoding, compression,etc.) or of the distribution of the degraded video sequence by the videocontent system can be modified in-process according to and uponreceiving results or instructions from the device for controlling thevideo content system.

As mentioned above, and as will be described further below, the qualityscores computed and used to evaluate the quality of the degraded videosequence by the device for controlling a video content system, can bebased on a relative quality of the degraded video sequence when comparedto a reference video sequence. In this regard, it would be appreciatedthat according to examples of the presently disclosed subject matter,the device for controlling the video content system can receive as inputa video sequence that is used as a reference video sequence forevaluating the quality of the degraded video sequence. Further by way ofexample, the input video sequence that is used as a reference videosequence is the video sequence (or data corresponding to a videosequence) prior to the processing by the video content system. In otherwords, the video sequence prior to processing by the video contentsystem can be used a reference for evaluating the quality of theprocessed video sequence.

In other examples, the input video sequence which corresponds to thedegraded video sequence is obtained from a source that is external tothe video content system. For example, the video content system canstore or deliver a degraded video sequence only, and the input(non-degraded) sequence may be provided in a separate file that is usedas a reference to evaluate a degradation of the (input) video sequencein the separate reference file. The causes for the degradation can bevaried and can include for example, encoding, bit-rate reduction,transmission errors etc. In this regard, in some examples of thepresently disclosed subject matter, the input (non-degraded) sequencecan be obtained for the purpose of the quality evaluation, and possiblyfor this purpose alone. It would be appreciated that in some examples ofthe presently disclosed subject matter, the input (non-degradedsequence) can be obtained from a different source than the degradedsequence (both the current degraded frame and the preceding degradedframe).

Further according to examples of the presently disclosed subject matter,the degraded video sequence can be a buffered video sequence that is acandidate output video sequence of the video content system. In thisexample, the candidate (degraded) output video sequence can be evaluatedbefore it is provided as output. The candidate output video sequence canbe replaced or additional processed and adjusted (one or more additionaltimes) in case the candidate output video sequence does not meet thequality criterion implemented by the device for control the videocontent system.

In yet further examples of the presently disclosed subject matter, thedegraded video sequence represents but is not identical to a videosequence that is to be provided as output of the video content system.For example, the video content system can distribute (e.g., communicate)a video stream, and the quality of the ongoing video stream can besampled, and the sampled video frames can be used as the degraded videosequence in the quality evaluation process implemented by the device forcontrolling the video content system. In yet another example, thedegraded video frames whose quality is evaluated by the device forcontrolling the video content system are not part of the same videosequence or video stream whose quality is influenced by theconfiguration modification that is implemented as a result of thequality evaluation.

Further by way of example, the evaluation process implemented by thedevice for control the video content system can take place in parallelwith the distribution of the video sequence. Thus, for example, thequality of sampled video frames used as the degraded video sequence canbe evaluated while the video stream distribution is ongoing. In case thedegraded video sequence does not meet the quality criterion, theconfiguration of the video stream distribution or the encodingparameters of the video stream can be adjusted and the modifiedconfiguration can influence the distribution of the subsequent frames.In other words, the evaluation of the quality of the degraded videosequence can be carried out with respect to a first set of video frameswhich are part of a certain video sequence and the configuration of thevideo content system which is associated with the results of the qualityevaluation by the device for controlling the video content systeminfluences the quality of subsequent video frames of the video stream(the same or a different video stream as the degraded video frames).

According to examples of the presently disclosed subject matter, theinput video sequence that is used by the device for controlling thevideo content system can provide a 1:1 (frame-to-frame) correspondencewith the degraded video sequence, such that for each degraded videoframe there is a corresponding input/reference video frame. According tofurther examples of the presently disclosed subject matter, the inputvideo sequence is only partial compared to the degraded video sequence,or vice-versa, and some sampling scheme or correspondence scheme can beused to evaluate the quality of the degraded video sequence based on thepartial input video sequence. In other examples, the degraded videosequence has a lower frame rate or frame count compared to the inputvideo sequence and the correspondence between degraded video frames andinput video frame is determined, for example, according to metadataembedded in the video frames, according to data describing the videosequence characteristics or parameters, e.g., timestamps, or using anyother synchronization or referencing data.

Regardless of the level of correspondence between the input and degradedvideo sequence, and the manner by which the correspondence isdetermined, according to examples of the presently disclosed subjectmatter, the device for controlling the video content system canimplement a full reference quality evaluation of the degraded videosequence, as will be described below. The term “full reference qualityevaluation” is know in the art, and is used to describe an evaluationprocess wherein for any degraded video frame there is available acorresponding input current frame and if preceding frames are involvedin the evaluation for any preceding degraded frame there is available acorresponding preceding input frame, and the quality evaluation is basedon processing the resulting frame pairs and frame groups, as describedin the examples of the presently disclosed subject matter providedbelow. This short definition of the term “full reference” is provided inaccordance with the term's conventional meaning in the art. Thisdefinition is non-limiting and is provided for convenience purposes.Accordingly, the interpretation of the term “full reference qualityevaluation” is not limited to the herein definition, and rather itshould be given its broadest reasonable interpretation.

By way of example, the quality evaluation process implemented by thedevice for controlling the video content system, and the respectiveconfiguration instruction provided by the device can enable control overa visual quality of a degraded video sequence (e.g., an encoded,compressed or distributed video sequence). In this regard, it would beappreciated that video content systems typically implement a set ofconfiguration parameters which can be modified or adjusted to controlthe system working point. The term “working point” is know in the art,and is used to describe a system's configuration settings. For example,for a video compression system the working point can include bit-ratesettings and other encoder settings (profile, encoding tools, encodingmodes etc.). This short definition of the term “working point” isprovided in accordance with the term's conventional meaning in the art.This definition is non-limiting and is provided for conveniencepurposes. Accordingly, the interpretation of the term “working point” isnot limited to the herein definition, and rather it should be given itsbroadest reasonable interpretation. According to examples of thepresently disclosed subject matter, the video content system can beconfigured to modify a certain process, feature, parameter orconfiguration which influences the degradation level of the degradedvideo sequence or to modify an allocation of a certain resource that isassociated with the system and which influences the degradation level ofthe degraded video sequence (e.g., a distribution resource).

For example, the video content system can be a video contentdistribution system and can include a video encoder that may be used toencode an input video sequence for distribution. The parameters, andpossibly also the working mode, of the video encoding process can beadjustable and can be modified according to an instruction from thedevice for controlling the video content system. Further by way ofexample, the adjustable parameters of the video content system caninclude a target bit-rate which can be fed to an encoder rate-controlmodule. Another example of adjustable parameters of the video contentsystem can be the encoding mode settings, such as a profile selectionand/or a level as defined, for example, in the underlying encodingspecification or standard (e.g., H.264). Yet another example ofadjustable parameters of the video content system can be parameters thatcontrol the video content system resource allocation, such as bandwidthallocations for various users, or allocation of channels to differentusers, etc.

According to examples of the presently disclosed subject matter, adevice for controlling a video content system can be configured toevaluate a quality of a degraded video sequence (e.g., a video clip),using a quality measure that is based on an inter-frame quality scoreand an intra-frame quality score, which is computed for a plurality ofvideo frame from the candidate degraded video sequence. Examples ofpossible procedures which can be implemented by the device forcontrolling the video content system, including various inter-frame andintra-frame quality measures are detailed below.

Further according to examples of the presently disclosed subject matter,and as also described below, a set of per-frame inter-frame andintra-frame quality scores can also be pooled by the device forcontrolling the video content system to provide a global quality score.By way of example, any standard norm or averaging operation can be usedfor pooling of the quality score. Further by way of example, a minimumvalue can be computed over the frame quality scores.

Based on the quality score calculated by the device for controlling thevideo content system, corresponding configuration instructions, e.g.configuration parameters, can be provided to the video content system,and the configuration instructions may enable the video content systemto adjust an operation or a resource allocation according to theconfiguration instructions. The adjustment by the video content systemcan change the level of degradation of the degraded video sequence, forexample to a level which meets the quality criterion which isimplemented by the device for controlling the video content system. Byway of example, if the quality of a degraded video sequence ischaracterized by the device for controlling the video content system tobe below the desired range or threshold, the device can provideconfiguration instructions that are effective for causing the videocontent system to increase a bit-rate allocation for a correspondingvideo content distribution session, and thereby to reduce the qualitydegradation of the video sequence. In another example, if the quality ofa degraded video sequence is characterized by the device for controllingthe video content system to be above a desired range or threshold, thedevice can provide configuration instructions that are effective forcausing the video content system to decrease the target bit-rateprovided to a video encoder operating within or associated with thevideo content system.

For convenience, examples of the device for controlling a video contentsystem are now described with reference to a video compression system.Examples of the presently disclosed subject matter are thus described,by way of example, with reference to a compression quality evaluationimplementation of the device for controlling a video content system.Still further by way example, and for convenience purposes, thecompression quality evaluation implementation of the device forcontrolling a video content system is referred to as the “device forcontrolling a compression of a video frame from a video sequence”. Itwould be appreciated that the reference made in the current disclosureto the device for controlling a compression of a video frame from avideo sequence can be replaced with a reference to the device forcontrolling a video content system. Furthermore, it would be appreciatedthat the examples of the presently disclosed subject matter discussedherein with reference or in relation to a compression or encodingprocess can be readily adapted by those versed in the art to beapplicable to other quality degrading processes which can be implementedby a video content system, and that the examples of the presentlydisclosed subject matter provided herein in respect of an encoding orcompression process can also be readily used to control a qualitydegradation introduced by other processes that are implemented by avideo content system.

In the following examples of the presently disclosed subject matter, theprocessing that is performed by the video content system is acompression of an input video sequence, and the result of thecompression is a corresponding compressed video sequence. The inputvideo sequence can consist of two or more input video frames orcorresponding digital data (for example, the input data can be in RAWformat). The two or more input video frames can consist of at least acurrent input frame, which is the frame that is currently beingcompressed and the compression of which is currently being evaluated,and a preceding input frame, which is a frame that precedes the currentinput frame. It would be appreciated that the two or more input frameswhich constitute the input video sequence can be in RAW format, forexample in the YUV domain, or can be encoded or compressed video frames,for example, MPEG-4 or H.264 frames.

Further by way of example, the degraded video sequence can be a sequenceof encoded or compressed video frames consisting of two or more videoframes. The perceptual quality of the compressed video sequence can begenerally degraded compared to the input video sequence, although itwould be appreciated that some of the frames in the degraded sequencecan have substantially the same quality (non-degraded) compared to thecorresponding frames in the input video sequence. For example, for someframes in the compressed video sequence the encoder can apply very finecompression or no compression at all. Still further by way of example,the perceptual quality of the compressed video sequence can be generallydegraded compared to the input video sequence due to deeper compressionof the compressed video sequence compared to the input video sequence(which may or may not be compressed).

Still further by way of example, for a given current input video frame,the device for controlling a compression of a video frame from a videosequence, can be configured to evaluate the perceptual quality of acandidate compressed frame. Further by way of example, the initialcandidate compressed frame can be generated by the video encoder usingsome initial quantizer parameter. For example, the video encoder can usea relatively fine quantizer parameter. The input video frame and thecorresponding initial candidate compressed frame can be obtained by thedevice for controlling the video encoder, and the device can evaluate,in a process that will be described in detail below, the quality of theinitial candidate compressed frame. In case it is determined that theinitial candidate compressed frame does not meet a quality criterionthat is implemented by the device for controlling the video encoder, thedevice can output an instruction to the video encoder that is effectiveto cause the video encoder to once more compress the current input frameusing updated compression parameter values. The updated compressionparameter values can be provided by the device for controlling the videoencoder, or can be selected or determined outside the device, forexample, according to a predefined algorithm. As a result of therepeated compression process (with different compression parametervalues), an updated candidate compressed frame is generated. The qualityevaluation process for the current input frame is now repeated, thistime based on the updated candidate compressed frame. The qualityevaluation process and the repeated compression of the current inputinstructed by the quality evaluation process can be repeated as manytimes as necessary, for example, until for a current candidatecompressed frame the quality criterion implemented by the device is met.It would be appreciated that in some cases the initial candidatecompressed frame can meet the quality criterion, and the evaluationprocess can terminate with the initial candidate compressed frame.

Configurations of the device for controlling a compression of a videoframe from a video sequence according to examples of the presentlydisclosed subject matter, which enable the iterative compression qualityevaluation process including the provisions for maintaining a candidatecompressed frame, and if necessary replacing the candidate compressedframe with an updated candidate compressed frame, until for somecandidate compressed frame a quality criterion is satisfied, and theninstructing the encoder to use that candidate compressed frame as theoutput compressed frame, are described below.

According to examples of the presently disclosed subject matter, for acurrent input frame, the device for controlling the video encoder canbuffer or can cause an external memory or storage resource to buffer apreceding input frame, which is a frame from the input video sequencewhich precedes the current input frame. The preceding input frame can bean input frame in respect of which a compression evaluation process hasalready been implemented, and a compressed output frame was alreadyprovided. For example, the preceding compressed frame which correspondsto the preceding input frame could have been generated under the controlof the device for controlling the video encoder according to examples ofthe presently disclosed subject matter. Further by way of example, thepreceding compressed frame which corresponds to the preceding inputframe can also be buffered and can be available for use by the devicefor controlling the video encoder in the quality evaluation process thatis implemented for the current input frame.

It would be appreciated that the preceding input frame used in theevaluation process implemented by the device for controlling the videoencoder can be the frame which immediately precedes the current inputframe in the input video sequence or any other frame that was previouslycompressed, including a frame which was compressed according to aninstruction from the device for controlling the video encoder and basedon the quality evaluation process implemented by the device (in thisexample, the preceding input frame is the frame before the compression).In other examples, more than one preceding frame are used as referencein the quality evaluation process implemented by the device forcontrolling the video controller, for example, an average precedinginput frame can be computed based on several preceding input frames, andan average preceding compressed frame can be computed based on thecorresponding compressed frames.

Further details with regard to the device for controlling a compressionof a video frame from a video sequence and with respect of a method ofcontrolling a compression of a video frame from a video sequence are nowprovided by way of example to the accompanying drawings.

Turning now to FIG. 1, there is shown a block diagram illustration of adevice for controlling a compression of a video frame from a videosequence, according to examples of the presently disclosed subjectmatter. According to examples of the presently disclosed subject matter,the device 100 for controlling a compression of a video frame from acurrent input video sequence, can include an interface module 10, abuffer 20, an encoding configurator 30, a processor 40 and a compressionquality evaluation module 50. It would be appreciated that aconfiguration that is similar to the configuration shown in FIG. 1 canbe used by the device for controlling a video content system accordingto examples of the presently disclosed subject matter.

According to examples of the presently disclosed subject matter, thevideo sequence can include at least a current input frame 112 and apreceding input frame 122. The current input frame 112 can be receivedat the device 100 through the interface 10. The current input frame 112can be an encoded or compressed frame and the interface module 10 caninclude a decoder to decode the current input frame 112. According toanother example, the current input frame 112 is decoded outside thedevice 100, and the current video frame 112 is received at the device100 as RAW pixels, for example in the YUV domain. By way of non-limitingexample, the device 100 can be used for controlling a recompressionprocess that is applied to a compressed video sequence. In furtherexamples, the device 100 can be used for controlling a raw videosequence or for controlling transcoding of a video sequence—i.e. wherethe input video sequence is encoded say with H.263 and the device 100 isused to control the transcoding of the H.263 video sequence into say aH.264 format video sequence.

In some examples of the presently disclosed subject matter, theinterface module 10 can be omitted from the device 100, for example, ifthe input that is fed or is otherwise received at the device 100 and theoutput 132 of the device does not necessitate interfacing. In otherexamples of the presently disclosed subject matter, the interface 10 canbe implemented and used for basic interfacing operations to enableconnection and/or communication of the device 100 with externalfunctional entities, such as an encoder, a decoder, a streamer or anexternal buffer.

As mentioned above, the device 100 can include a buffer 20. According toexamples of the presently disclosed subject matter, the buffer 20 can beadapted to hold a preceding input frame 122 and a preceding compressedframe 124 corresponding to the preceding input frame 122. The precedingcompressed frame 124 is also referred to herein as the “storedcompressed frame”. As mentioned above, in some examples of the presentlydisclosed subject matter, the preceding input frame 122 can be a frameof the input video sequence which immediately precedes the current inputframe 112. However, it should be appreciated that in further examples ofthe presently disclosed subject matter, the term “preceding” does notnecessarily refer to the temporal order of the frames, and the precedinginput frame or candidate compressed frame is not necessarily the framewhich in the temporal order immediately precedes the current input frameor the current candidate compressed frame, respectively, in the temporalorder. In this regard, it would be appreciated that according to furtherexamples of the presently disclosed subject matter, the term precedingcan relate to a frame which precedes the current (input or compressedcandidate) frame in the coding order, which is not necessarily thetemporally preceding frame, for example when B-frames are used. Thestored compressed frame 124 can be the product of an encoding (or acompression) process, in which the now preceding input frame 122 was thecurrent input frame.

The device 100 according to examples of the presently disclosed subjectmatter can be used for controlling an encoding process of the inputvideo sequence, including the encoding of the preceding input frame 114,and the result of that process can be the preceding compressed frame124. Device 100 can also be used for controlling an encoding process ofthe input frame 112, and the result of that process can be the candidatecompressed frame 122 that meets the quality criterion implemented by thedevice 100. Further by way of example, the compressed frame(s) which isencoded/compressed according to instructions provided by the device 100can be provided, possibly after being decoded, to the device 100 and canbe used for determining the encoding/compression configurations for thesubsequent frame(s) of the video sequence, as will be explained infurther detail below. In other examples, the preceding compressed frame124 can be a result of any other encoding/compression process, and itsencoding/compression is not necessarily associated with the operation ofthe device 100.

It would be appreciated that the device 100 according to examples of thepresently disclosed subject matter can be used for controlling acompression of a video frame such that the output frame meets a qualitycriterion, for example, a perceptual quality criterion. In some examplesof the presently disclosed subject matter, the quality of a compressedor recompressed video frame can be evaluated by the device 100 as partof the sequence of video frames, using the preceding input frame and thecorresponding preceding compressed frame, as will be explained infurther detail below.

According to examples of the presently disclosed subject matter, theencoding configurator 30 can be operatively connected to a video encoder(not shown). In some examples of the presently disclosed subject matter,the video encoder can be implemented outside the device 100, and theencoding configurator can communicate with the external video encoder,possibly through the interface module 10. In other examples, the videoencoder can be implemented as part of the device 100.

According to examples of the presently disclosed subject matter, theencoding configurator 30 can be adapted to instruct the video encoder tocompress the current input frame 112 according to compression parametervalues, giving rise to a candidate compressed frame 122. Further by wayof example, the encoding configurator 30 can be adapted to determine thecompression parameter values that are to be used for compressing thecurrent input frame 112.

In this regard it would be appreciated that the compression parametersin many video encoders can be set either by an external parameter thatis provided by an operator of the encoder, and/or by a rate-controlmodule within the encoder. According to examples of the presentlydisclosed subject matter, the encoding configurator 30 can be adapted todetermine the values for one or more of the following compressionparameters: the quantizer parameter (“QP”), bit-rate parameter, acompression level indicating a preconfigured set of parameters in agiven encoder. Further by way of example, any of the above compressionparameters can be used by the device 100 to configure and control thecompression process. For convenience purposes, some examples of thepresently disclosed subject matter are now described with reference tothe QP, however, it should be noted that the examples provided hereinwith reference to the QP can also be applied to other types ofcompression parameters. Thus, according to examples of the presentlydisclosed subject matter, methods to set the quantizer value by the ratecontrol module are varied. Often the encoder is aiming for a targetbit-rate and therefore the quantizer for the frame is set according toindications of the current buffer status based on the bit-rate obtainedthus far while possibly combining considerations related to theestimated frame complexity, and then is adapted per macroblock accordingto the MB characteristics. In some examples of the presently disclosedsubject matter, the device 100 can operate in cooperation with arate-control module of the encoder (or that is associated with theencoder) to adapt the QP per macroblock, but overwrite the frame QPvalue (also known as the average QP) with a value derived from thetarget quality criteria implemented by the device 100. The frame can beinitially encoded with an estimate for an appropriate QP value. Examplesof the initial QP parameter can include an arbitrary parameter, the QPused for compressing a preceding frame or an estimation that is based onsome statistical analysis of the QP selected for preceding frames.According to examples of the presently disclosed subject matter, if thequality is determined by the device 100 to be too low, the quantizationcan be refined (i.e. lower value) based on an appropriate instructionfrom the device 100, if the quality is above a target range implementedby the device 100, the device can instruct the encoder to generate a(new) candidate compressed frame using coarser quantization—thus thequantization parameter is increased. According to examples of thepresently disclosed subject matter, some convergence or optimizationcriterion can be implemented in order to select a “good enough”candidate compressed frame that meets the quality criterion, and theprocess need not necessarily continue until the best result is achieved.In this regard, it would be appreciated that according to examples ofthe presently disclosed subject matter, any known search or root-findingmethod can be to converge to the target QP value, such as—but notlimited to, the Bisection method, Secant based search etc. The candidatecompressed frame 114 can be temporarily stored or memorized, forexample, in a cache (not shown) or in the buffer 20.

Reference is now made to FIG. 2, which is a flowchart illustration of amethod of controlling a compression of a video frame from a videosequence, according to examples of the presently disclosed subjectmatter. As mentioned above, according to examples of the presentlydisclosed subject matter, the description of the method of controlling acompression of a video frame from a video sequence is provided as anexample of a method of controlling a video content system. The videocontent system can implement various quality degrading processes,including processes associated with video sequence distribution, and theexamples of the method of controlling a compression of a video frame canbe used, mutatis-mutandis, to control a video content system, and inparticular a quality degrading process that is implemented by the videocontent system.

For convenience, examples of the presently disclosed subject matter ofthe method of controlling a compression of a video frame shall now bedescribed with reference to the device for controlling a compression ofa video frame shown in FIG. 1. The attribution of the operationdescribed herein to the various components of the device for controllinga compression of a video frame shown in FIG. 1 is made by way ofexample. It would be appreciated that one or more components device forcontrolling a compression of a video frame shown in FIG. 1 can beomitted, combined and additional components can be added to the device,and the operations described herein can be carried out by thecorresponding components or such a device. It would also be appreciatedthat the method of controlling a compression of a video frame can beimplemented on any suitable device or system, including but not limitedto the device for controlling a compression of a video frame that isdescribed herein, including with reference to FIG. 1. In other examples,the method of controlling a compression of a video frame can beimplemented on a standard or custom built computerized system thatincludes a processor, memory and a tangible storage device. The methodof controlling a compression of a video frame can be embodied incomputer readable program code. The computer readable program code canbe stored on a tangible storage device and can be executed by theprocessor to perform the operations described herein. The computerizedsystem on which the method of controlling a compression of a video framecan be implemented on can be a standalone computerized system or can bedistributed across a plurality of inter-connected computerized devices.

Turning now to a description of an example of a method of controlling acompression of a video frame according to examples of the presentlydisclosed subject matter, at some point, a compression qualityevaluation process can be initiated with respect to a given input videoframe. According to examples of the presently disclosed subject matter,the evaluation process can be used to select compression parametervalues for compressing a current input frame 112 such that the relativeperceptual quality of a respective output compressed frame meets acompression quality criterion.

According to one non-limiting example, the compression qualityevaluation process can be initiated when a current input frame 112 isreceived (block 205) at the device 100. The current input frame 112 canbe the frame which is about to be encoded or compressed by an encoder,and the compression quality evaluation process can be utilized tocontrol the compression of this frame to enable the encoder to provide arespective output compressed frame which meets a quality criterion thatis implemented by the device 100.

It would be appreciated, that other triggers can be used to initiate thecompression quality evaluation process, and that whichever eventtriggers the compression quality evaluation process, some datarepresenting the current input frame 112 is received by the device 100and is used in the compression quality evaluation process.

According to examples of the presently disclosed subject matter, thedata representing the current input frame 112 can be the actual videoframe, or some other data which is representative of the frame,including data sampled from the original frame. The data representingthe frame can be encoded, or in RAW format, and the frame can becompressed or not.

Resuming the description of FIG. 2, at block 210 an initial compressionparameter value can be obtained, for example by the encodingconfigurator 30. The initial compression parameter value can be presetor can be computed or selected. For example, the initial compressionparameter value can be manually selected by an operator of the device100. In a further example, the initial compression parameter value canbe computed or selected according to a characteristic of the currentinput video frame 112, such as frame resolution, pixel value energy orvariance, Sum of Absolute Difference compared to the preceding frame,according to a characteristic of a preceding input video frame 122, oraccording to a characteristic of the input video sequence.

As will be further discussed below, according to examples of thepresently disclosed subject matter, the compression quality evaluationprocess implemented with respect to a given current input frame 112 bythe device 100 can be an iterative process, and as part of thecompression process controlled by the device 100, the encodingconfigurator 30 can provide the encoder with compression parametervalue(s) for each iteration of the compression process. The configurator30 can use any known or yet to be devised incrimination, optimizationand/or search algorithm for selecting or computing a compressionparameter value for each iteration of the compression quality evaluationprocess. Examples of algorithms for determining a compression parametervalue can include but are not limited to: exhaustive search, searchusing root finding algorithms such as Bisection, Newton-Raphson, Secantor others. According to a further example of the presently disclosedsubject matter, the compression parameter values that are used by theencoding configurator 30 are preset, and at each iteration therespective compression parameter value from the preset series ofcompression parameter values is selected. According to still a furtherexample of the presently disclosed subject matter, an operator of thedevice is still partially involved in setting the compression parametervalues that are used by the encoding configurator 30 can be at leastpartially manually set by an operator of the device 100.

Once a quantizer parameter value is obtained, the encoding configurator30 can adapted to provide encoding instructions 132 to the video encoder(block 225). The encoding instruction can be configured to cause thevideo encoder to encode the current input frame using the currentcompression parameter value. At block 230 a candidate compressed videoframe 114 can be received at the device 100. The candidate compressedframe 114 can be the video frame which the video encoder generated bycompressing the current input frame 112 according to the instructions132 received from the device 100. For example, the candidate compressedframe 114 can be a result of a compression of the current input frame112 according to the compression parameter value provide by the device100.

It would be appreciated that the reference made herein to any one ofcurrent input frame 112, the preceding input frame 122, the currentcandidate compressed frame 114 and the preceding compressed frame 124can relate to data which corresponds to and represents the respectivevideo frames. For example, instead of the actual video frames, which maybe encoded video frames, the data that is fed to the device 100 and withrespect of which the method of evaluating a compression of a video frameis implemented can be RAW digital data which corresponds to the actualvideo frames. In other examples, the device 100 includes a decoder (notshown) and can receive the encoded video frame or a bitstreamrepresenting an encoded frame sequence, and decode the video framesinternally.

Based on the current input video frame 112 and the current candidatecompressed video frame 114 the compression quality evaluation module 50,possibly in cooperation with the processor 30, can compute anintra-frame quality score. For example, the compression qualityevaluation module 50 can compute an intra-frame quality score using anintra-frame quality measure that is applied in the pixel-domain of thecurrent candidate compressed video frame 114 and the current input frame112 (block 235). More details regarding the computation of theintra-frame quality score are provided in examples of the presentlydisclosed subject matter which are provided below.

For a given current input video frame 112 (starting from the secondframe of the input video sequence) a preceding input frame 122 (block215), and a stored compressed frame 124, which is also referred toherein as the preceding compressed frame, can be obtained (block 220).According to examples of the presently disclosed subject matter, thepreceding compressed frame 124 is the compressed frame which correspondsto the preceding input frame 122. As mentioned above, the precedingcompressed frame 124 can be stored within a buffer 20 of the device 100.The preceding input frame 122 can also be, but is not necessarily,stored within the buffer 20. For example, the preceding input frame 122can be stored in the buffer 20 as part of or in association with aprevious iteration of the compression quality evaluation process, inwhich the now preceding input frame 122 was the current input frame.Likewise, the preceding compressed frame 124 corresponding to thepreceding input frame 122 can be stored in the buffer 20 as part of orin association with a previous iteration of the compression qualityevaluation process, in which the now preceding compressed frame 124 wasthe current compressed frame.

Using the data inputs which correspond to the current input frame 112,the preceding input frame 122, the current candidate compressed frame114 and the preceding compressed frame 124, an inter-frame quality scorecan be computed. According to examples of the presently disclosedsubject matter, in order to allow the compression quality evaluationmodule 50 to compute the inter-frame quality score, a processor 30 canbe utilized to compute a first differences value from the current inputframe and preceding input frame, and a second differences value from thecandidate compressed frame and the preceding compressed frame (block240). The compression quality evaluation module 50, possibly incooperation with the processor 30, can be adapted to determine aninter-frame quality score for the current candidate compressed framebased on a comparison between the first and second differences values(block 245).

Based on the computed intra-frame quality score and inter-frame qualityscore, the quality evaluation module 50, possibly in cooperation withthe processor 30, can compute an overall quality score for the currentcandidate compressed frame 114 (block 250). A quality criterion can beimplemented by the quality evaluation module 50, and the qualityevaluation module 50 can use the quality criterion to evaluate theoverall quality score for the current candidate compressed frame 114, todetermine whether the current candidate compressed frame 114 meets thequality criterion (block 255). The target quality can be set to obtain apre-determined quality level, for instance the target quality can betuned for perceptually lossless recompression, as determined by aperceptually lossless quality measure implemented as part of the qualityevaluation process. In a further example, the quality criterion can beadapted for a specific video sequence, to provide a particular targetbit-rate at constant perceptual quality.

According to examples of the presently disclosed subject matter, theencoding configurator 30 can be responsive to a current candidatecompressed frame 114 failure to meet the quality criterion, forobtaining an updated compression parameter value (block 260), and blocks225 through 255 can be repeated according to the updated compressionparameter value and according to the corresponding (new) currentcandidate compressed frame. According to examples of the presentlydisclosed subject matter, the updated compression parameter value iscomputed based on the previous compression parameter value. According toone example of the examples of the presently disclosed subject matter,the updated compression parameter value can be based on the value usedin a previous iteration of the quality evaluation process with a steppedmodification, for example deltaQP can be added (or subtracted) from thecompression parameter value that was used in a previous iteration, where(in the case of an addition) deltaQP is negative if the quality was “toolow” and positive if quality was “too high”. The deltaQP factor can alsobe adaptive, in which case, deltaQP can be adapted, for example,according to the distance from the target quality. In further examples,the quality evaluation process can include an iterative search usingknown root finding algorithms such as Bisection, Newton-Raphson, Secantor others.

According to examples of the presently disclosed subject matter, when acurrent candidate compressed frame 114 meets the quality criterionimplemented by the quality evaluation module 50, the encodingconfigurator is configured to instruct the video encoder to provide thecurrent candidate compressed frame 114 as the output frame for therespective current input frame 112 (block 265). Thus, in some examplesof the presently disclosed subject matter, the method of controlling acompression of a video frame, can enable a video encoder to provide fora given input frame a respective compressed video frame, whose overallquality, measured as a combination of the compressed frame's inter-frameand intra-frame relative perceptual quality, meets a desired qualitycriterion. According to further examples of the presently disclosedsubject matter, the method of controlling a compression of a videoframe, can further enable the video encoder to provide a near maximalcompression rate for a given input frame while maintaining the overallrelative perceptual quality of the respective compressed video frame ata level that meets a desired quality criterion.

Reference is now made to FIG. 3, which is a flowchart illustration ofthe method of controlling a compression of a video frame shown in FIG. 2with the addition of tiling processing. Blocks 205-230 are essentiallyunchanged from FIG. 2. At block 305, the current input frame 112 and thecurrent candidate compressed frame 114 are partitioned into a pluralityof tiles. According to examples of the presently disclosed subjectmatter, the device 100 can include a frame partitioning module 60 thatis adapted to partition video frames into tiles of a predefined size.Further by way of non-limiting example, tile dimensions can be somemultiple of coding block size and examples can be: 64×64, 80×80,128×128. Further by way of example, the tiles can be square but can alsohave other shapes or forms. Still further by way of example, tile sizecan be adapted for instance according to frame resolution, such that,for example, smaller tiles can be used for smaller frames. Yet furtherby way of example, tile size can be calculated according to the numberof tiles that would fit into a given frame, with possible rounding to awhole multiple of coding block size.

Tiles from the current input frame 112 are matched with correspondingtiles from the current candidate compressed frame 114 to provide aplurality of tile pairs (block 310). For example, a given tile from thecurrent input frame which is defined over a given area of the currentinput frame 112 is matched with a tile from the current candidatecompressed frame which is defined over the corresponding area of thecurrent candidate compressed frame 114.

Once the tiles are paired, an intra-tile quality score is computed foreach tile pair (block 315). For example, the compression qualityevaluation module 50 can compute an intra-tile quality score using anintra-tile quality measure that is applied in the pixel-domain of eachcurrent tile pair. More details regarding the computation of theintra-frame quality score are provided in examples of the presentlydisclosed subject matter which are discussed below.

The preceding input frame 122 and the preceding compressed frame 124 canalso be partitioned (block 320) and corresponding tiles from the currentinput frame 112, the preceding input frame 122, the current candidatecompressed frame 114, and the preceding compress frame 124 can begrouped (block 325). By way of example, for each group of tiles, a firstdifferences value can be computed from a tile of the current input frameand a respective tile from the preceding input frame, and a seconddifferences value can be computed from a respective tile of thecandidate compressed frame and a respective tile of the precedingcompressed frame (block 330). Further by way of example, an inter-tilequality score can be computed for a tile of a current candidatecompressed frame based on a comparison between the respective first andsecond differences values (block 335).

According to examples of the presently disclosed subject matter,perceptually driven weights can be applied to at least some of theintra-tile and inter-tile quality scores that were computed for thecurrent candidate compressed frame 114 (block 340), for example by aperceptual weighting module 72 that is implemented as part of the tilescore pooling module 70. According to examples of the presentlydisclosed subject matter, the perceptual weighting module 72 can beadapted to provide more or less weight to particularly dark orparticularly saturated tiles. Further by way of example, the perceptualweighting module 72 can be adapted to give more or less weight to poorperforming tiles (tiles with the lowest quality scores). Still furtherby way of example, the perceptual weighting module 72 can adapted togive different emphasis to different tiles depending on their locationin the frame using appropriate location based weighting of tiles, forinstance, the perceptual weighting module 72 can apply weights whichemphasize tiles located at the frame's center. An example of animplementation of the method of controlling a compression of a videoframe that includes the application of weights to at least someintra-tile and inter-tile quality scores computed for a currentcandidate compressed frame is provided below.

According to examples of the presently disclosed subject matter, theintra-tile and inter-tile quality scores computed for a given currentcandidate compressed frame, can be pooled together, possibly afterperceptual weighting, to provide a frame quality score for the currentcandidate compressed frame 114 (block 345). Blocks 255-265 are appliedwith respect to the frame quality score and are similar to thecorresponding blocks in FIG. 2 which were described above.

According to examples of the presently disclosed subject matter, theintra-frame quality score computation can include computing a pixeldomain quality measure. Further by way of example, a full-referencepixel-domain quality measure can be used. Still further by way ofexample, computing an intra-frame quality score can be based on apixel-wise difference between the current input frame 112 and thecurrent candidate compressed frame 114.

According to examples of the presently disclosed subject matter, thedevice for controlling a compression of a video frame 100 can have anintra-wise quality evaluation module 80. The intra-wise qualityevaluation module 80 is configured to operate in the intra-frame or inthe intra-tile domain and with respect to a candidate compressed frame114 versus a current input frame 112 or with respect to a tile pair (atile from the candidate compressed frame versus a respective tile fromthe current input frame). Accordingly, the intra-wise quality evaluationmodule 80 can receive as input a current candidate compressed frame 114and a current input frame 112 or a tile pair (a tile from the candidatecompressed frame and a respective tile from the current input frame) andcan compute an intra-frame quality score or an intra-tile score using afull-reference pixel-domain quality measure.

By way of example, the tiles can be generated by a partitioning module60 that is implemented as part of the compression quality evaluationmodule 50, and the tile scores can be pooled by a score pooling module70 which can also be implemented as part of the compression qualityevaluation module 50.

There is now provided a description of various modules of the intra-wisequality evaluation module 80. According to examples of the presentlydisclosed subject matter, one or more of the modules of the intra-wisequality evaluation module 80 described below can be utilized to enablethe device 100 to compute an intra-frame quality score, which in turncan be used to compute a frame quality score. It would be appreciatedthat some of the modules and/or some of the quality measures that aredescribed here as being used for computing the frame quality score,including in particular some of the modules and/or quality measures thatare described here as being used for computing the intra-frame qualityscore, are optional. It would also be appreciated, that the intra-wisequality evaluation module 80 and the modules which are implemented aspart of the intra-wise quality evaluation module 80, and thecorresponding quality measures' computation procedures, which aredescribed here by way of example can be configured according to theinput that is provided to the modules and based on which the computationprocedures are implemented.

As mentioned above, for convenience, and by way of example, theintra-wise quality evaluation module 80 is described herein as having aplurality of modules, which are each operable for computing someintra-wise quality measure. In case the intra-wise quality evaluationmodule 80 includes more than one module, the two or more intra-wisequality measures provided by the modules of the intra-wise qualityevaluation module 80 can be combined, and can be implemented, forexample, on standard computer hardware. Furthermore, in case theintra-wise quality measures provided by the modules of the intra-wisequality evaluation module 80 are configured for a given frame pair toapply the intra-wise quality measures to a plurality of correspondingtile pairs, the tile pairs' scores can be pooled to provide a qualitymeasure for the entire frame (or frame pair), as will be describedbelow.

A set of operations which can be implemented according to examples ofthe presently disclosed subject matter for calculating a full-referencepixel-domain quality measure is now described. For convenience thefull-reference pixel-domain quality measure is described according to anexample of an implementation of an intra-wise quality evaluation module80 and a pixel-wise difference evaluation module 120. It should be notedhowever, that some examples of the method of controlling a compressionof a video frame according to the presently disclosed subject matter,including the implementation of the full-reference pixel-domain qualitymeasure computation, are not limited by the example that is shown inFIG. 1 and described herein with reference thereto, where the fullreference pixel-domain quality evaluation is carried out by theintra-wise quality evaluation module 80 and the pixel-wise differenceevaluation module 120.

According to examples of the presently disclosed subject matter, theintra-wise quality evaluation module 80 can include at least apixel-wise difference evaluation module 120. Similarly, according toexamples of the presently disclosed subject matter, the intra-framequality score computation can include at least a full-referencepixel-domain quality measure computation. The full-referencepixel-domain quality measure computation that can be implemented by apixel-wise difference evaluation module 120 is now described by way ofexample.

In some examples of the presently disclosed subject matter, thepixel-wise difference evaluation module 120 can receive as input acurrent candidate compressed frame 114 and a current input frame 112 andthe full-reference pixel-domain quality measure can be computed based onthe complete frames. In yet further examples of the presently disclosedsubject matter, pixel-wise difference evaluation module 120 can receiveas input a plurality of tile pairs which correspond to a frame pair, andthe full-reference pixel-domain quality measure can be computed eachtime for a different tile pair, and the tile pair quality score can becombined or pooled, possibly after being processed to provide anintra-frame quality score.

According to yet further examples of the presently disclosed subjectmatter, for a given tile pair the pixel-wise difference evaluationmodule 120 can be configured to receive as input a plurality of tilepairs. The pixel-wise difference evaluation module 120 can be configuredto further partition each the input tile pairs (or some subset thereof)into a plurality of corresponding sub-tile pairs. The pixel-wisedifference evaluation module 120 can be configured to compute an intrasub-tile quality score for each one of the plurality of sub-tile pairs.The pixel-wise difference evaluation module 120 can be configured toprocess the plurality of sub-tile scores and can pool the plurality ofsub-tile scores to provide a respective tile quality score. The tilescore which results from the pooling of the (possibly processed)sub-tile scores can be provided as output of the pixel-wise differenceevaluation module 120. According to examples of the presently disclosedsubject matter, the pixel-wise difference evaluation module 120 caninclude a partitioning module 122 that can be utilized to partitioninput tile pairs into a corresponding plurality of sub-tile pairs. Thepixel-wise difference evaluation module 120 can also include a tilescore pooling module 124 that is configured to pool a plurality sub-tilescores into a corresponding tile score. Furthermore, according toexamples of the presently disclosed subject matter, the pixel-wisedifference evaluation module 120 can include a brightness normalizationmodule 125 that is configured to normalize the intra-frame quality scorebased on a brightness parameter value of pixels in either the candidatecompressed frame or the input frame.

Reference is now made to FIG. 4, which is a flowchart illustration of afull-reference pixel-domain quality measure computation which can beimplemented as part of a method of controlling a compression of a videoframe, according to examples of the presently disclosed subject matter.In FIG. 4, it is shown, by way of non-limiting example, a process ofcomputing a full-reference pixel-domain quality measure that is appliedto a tile pair that is provided as input (block 405), and wherein theprocess includes partitioning the tile pair into a plurality of sub-tilepairs and pooling a respective plurality of sub-tile pixel-domainquality measure to provide as output a pixel domain quality measure forthe respective tile of the current candidate compressed frame.

The input tile pair can be further partitioned to provide a respectiveplurality of sub-tile pairs (block 410). The partitioning of the tilepair can be carried out by the tile partitioning module 122. Eachsub-tile pair can include respective areas of a current candidatecompressed frame and of a current input frame. According to examples ofthe presently disclosed subject matter, for a sub-tile pair, a sub-tilepixel-wise score can be computed. The sub-tile pixel-wise score can becomputed for each one of a plurality of sub-tile pairs (block 415). Forexample, block 415 can be repeated for each one of the plurality ofsub-tile pairs which correspond to the input tile pair.

Optionally, the pixel-wise difference evaluation module 120 can apply anadaptive filter to the sub-tile scores. The adaptive filter can beconfigured according to a lowest sub-tile score and can be applied tothe sub-tile pixel-wise scores (block 420). Further as an optionalimplementation, the pixel-wise difference evaluation module 120 caninclude a perceptual weighting module 126 that is configured to applyperceptually weights to the remaining sub-tile scores (after thefiltering in block 420), and compute an weighted average of the sub-tilescores (block 425). As an alternative, the sub-tile scores can beotherwise combined to provide a pixel-wise tile score.

Finally, a pixel-wise tile score can be provided as output (block 430).The pixel-wise difference evaluation module 120 can include a sub-tilescore pooling module 124 that is used for pooling sub-tile quality scoreto provide a corresponding tile score. As mentioned above, the output ofthe pixel-wise difference evaluation module 120 can be combined withother intra-wise quality evaluation score to provide an overallintra-tile or intra-frame quality score.

There is now provided a description of one possible implementation of apixel-wise difference evaluation computation according to examples ofthe presently disclosed subject matter. As part of the possibleimplementation of a pixel-wise difference evaluation computationaccording to examples of the presently disclosed subject matter, adifference image, T_(D) can be calculated for a candidate compressedframe tile. The difference image can be computed as a pixel-by-pixelsubtraction of the tile from the current candidate compressed frame,T_(T), from the respective tile in the current input frame, T_(R).

A Peak-Signal-to-Noise-Ratio, or PSNR can be used to estimate S_(PWD),the Pixel-Wise Difference quality score component for the tile pair. Amathematical representation of a possible estimation of the pixel-wisedifference quality score component for the tile pair is provide inFormula (1), where MAX₁ is the maximum possible pixel value, forinstance 255 for an 8 bit per pixel plane, and M, N are the tiledimensions:

$\begin{matrix}{{P\; S\; N\; R} = {20 \cdot {\log_{10}\left( \frac{{MAX}_{I}}{\sqrt{\frac{1}{M \cdot N}{\sum\limits_{m = 0}^{M - 1}{\sum\limits_{n = 0}^{N - 1}{T_{D}\left( {m,n} \right)}^{2}}}}} \right)}}} & {{Formula}\mspace{14mu}(1)}\end{matrix}$

Calculating the PSNR jointly over an entire tile, can lead to loss ofaccuracy when the tile consists of a small area of detail set in asubstantially ‘blank’ background. Therefore, as part of examples of thepresently disclosed subject matter, a tile pair can be furtherpartitioned into a plurality of sub-tiles. For example, a tile pair canbe further partitioned into 4×4, or 16 equal sized sub-tiles, and thePSNR computation, such as was presented in Formula (1) can be applied toeach one of the plurality of sub-tiles. It would be appreciated that foridentical sub-tiles the PSNR score can be set to a certain predefinedvalue to avoid the risk of division by zero. For example, for identicalsub-tiles the PSNR score can be set to PSNR=1000.

In order to emphasize “poor” behaving sub-tiles, set in ‘blank’backgrounds a filter can be applied to the sub-tile quality scores. Forexample, the following threshold to be used in pooling over psnrST—thePSNR sub-tile values can be implemented:

Set psnrMin to minimum of psnrST(i,j).

Set psnrThr to the minimum between 0.95*50 and 2.5*psnrMin.

In examples of the presently disclosed subject matter, the 0.95*50 valuecan indicate high absolute quality, since a PSNR of 50 can be considered“perfect”, and If (psnrMin<psnrThr) psnrV is set to the average betweenpsnrMin and the average of all components in psnrST(i,j) which are belowpsnrThr; otherwise psnrV is set to psnrMin. It would be appreciated thatthe above filtering and averaging can be operative for excluding wellbehaving, i.e. high valued PSNR, sub-tiles form the calculation of thetile score, if low quality, i.e. low valued PSNR, sub-tiles are present.

It would be appreciated that the values provided above are merely anexample, and that examples of the presently disclosed subject matter canbe implemented with other appropriate values for the parameterspresented herein.

Beyond a certain threshold, which is labeled herein as THRPSNR, PSNRdifferences can become imperceptible. The inventors of the presentdisclosure have discovered that the THRPSNR threshold can be, at leastto some degree, dependant on the average luminance of the respectiveframe, tile or sub-tile. Therefore, according to examples of thepresently disclosed subject matter, a THRPSNR that is a function of themaximum luma value in the current input frame (although the maximum lumavalue in the current candidate compressed frame can also be used) can beimplemented as follows:

$\begin{matrix}{{T\; H\; R_{PSNR}} = \left\{ \begin{matrix}50 & {{{if}\mspace{14mu}\max\; V} \geq 128} \\{{{0.0016 \cdot \max}\; V^{2}} - {{0.38 \cdot \max}\; V} + 72.5} & {else}\end{matrix} \right.} & {{Formula}\mspace{14mu}(2)}\end{matrix}$Where maxV is the maximum luma value in tile.

It would be appreciated that Formula 2 can also be implemented as anequivalent Look-Up-Table.

According to examples of the presently disclosed subject matter, thecalculated PSNR based sub-tile quality score can be clipped. The PSNRbased sub-tile quality score can also be computed so that it lies in therange [0,1]. The clipping and scaling is demonstrated in Formula (3):

$\begin{matrix}{S_{PWD} = {\max\left( {0,{\min\left( {\frac{P\; S\; N\; R}{T\; H\; R_{PSNR}},1} \right)}} \right)}} & {{Formula}\mspace{14mu}(3)}\end{matrix}$

As mentioned above, according to examples of the presently disclosedsubject matter, as part of evaluating the quality of a current candidatecompressed frame, an inter-frame quality score can be computed. Theinter-frame quality score together with the intra-frame quality scoreare used according to examples of the presently disclosed subject matterto evaluate the perceptual quality of a given current candidatecompressed frame, and the evaluation of candidate compressed frames canbe used to control a compression of a video frame.

By way of example of the presently disclosed subject matter, aninter-frame quality evaluation process is now described which implementsa temporal consistency quality measure. For convenience, and further byway of example, the herein below description is made with reference toone possible configuration of the device for controlling a compressionof a video frame, wherein an inter-wise quality evaluation module 90 isconfigured to operate in the inter-frame or in the inter-tile domain toprovide an inter-frame quality score, or an inter-tile quality scorethat can be used to compute an inter-frame quality score. In yet furtherexamples of the presently disclosed subject matter, the inter-wisequality evaluation module 90 can operate at an inter-sub-tile domain toprovide an inter-sub-tile quality score that can be used to computer aninter-tile quality score and an inter-frame quality score, as will bedescribed below.

Still further by way of example, in the description below, theinter-wise quality evaluation module 90 includes a temporal consistencyevaluation module 92 that is configured to implement the temporalconsistency quality measure which can be used to calculate theinter-frame quality score, or the inter-tile quality score (which can isused to calculate the inter-frame quality score) or the inter-sub-tilequality score. Similarly, according to examples of the presentlydisclosed subject matter, the inter-frame quality score computation caninclude at least a temporal consistency quality measure computation. Thetemporal consistency quality measure computation that can be implementedby the temporal consistency evaluation module 92 is now described by wayof example.

Still further by way of example, computing an inter-frame quality scorecan be based on two difference values: the first difference value isbased on a pixel-wise difference between the current input frame 112 andthe preceding input frame 122, and the second difference value is basedon a pixel wise difference between the current candidate compressedframe 114 and the preceding compressed frame 124.

According to examples of the presently disclosed subject matter, thedevice for controlling a compression of a video frame 100 can have aninter-wise quality evaluation module 90. The inter-wise qualityevaluation module 90 can be configured to operate in the inter-frame orin the inter-tile domain. The inter-wise quality evaluation module 90can include a temporal consistency evaluation module 92 that isconfigured to evaluate a temporal consistency of the current candidatecompressed frame. As will be described below, in some examples of thepresently disclosed subject matter, the temporal consistency evaluationmodule 92 can be configured to implement the temporal consistencyquality measure at a per-tile level, computing a temporal consistencyscore for each one of a plurality of tiles of a current candidatecompressed frame, and in further examples of the presently disclosedsubject matter, the temporal consistency evaluation module 92 can beconfigured to implement the temporal consistency quality measure at aper sub-tile level, computing a temporal consistency score for each oneof a plurality of sub-tiles which are part of one of a plurality oftiles of a current candidate compressed frame. The plurality of temporalconsistency sub-tile scores and/or the plurality of temporal consistencytile scores can be combined to provide a corresponding temporalconsistency tile score and/or a temporal consistency frame score,respectively.

In some examples of the presently disclosed subject matter, for a givencurrent candidate compressed frame 114, the temporal consistencyevaluation module 92 can receive as input a group of frames consistingof: a current input frame 112, a preceding input frame 122, a currentcandidate compressed frame 114 and a preceding compressed frame 124, andthe temporal consistency quality measure can be computed based on thecomplete frames in the group.

For convenience the above four frames are referred to herein as “thegroup of frames” or as “the frames group”. It would be appreciated thata group of frame can consist of any (even) number from four and above.The group can include six or more frames, when the temporal consistencyis evaluated based on a comparison of each of the current candidatecompressed frame and the current input frame to two or more precedingcompressed frame and preceding input frames, respectively.

Further by way of convenience, a set of tiles that is comprised of acorresponding tile from each frame in a group of frames (four or moretiles in total) is referred to herein as “the group of tiles” or as “thetiles group”, and a set of sub-tiles that is comprised of acorresponding sub-tile from each tile in a group of tiles is referred toherein as a “the group of sub-tiles” or as “the sub-tiles group”.

Each tile group can be associated with a given area of the respectiveframes, and each sub-tile group can be associated with a given area ofthe respective tiles, and with a given area of the respective frames.

It should be appreciated that according to examples of the presentlydisclosed subject matter, in a group of frames/tiles/sub-tiles, thepreceding frames/tiles/sub-tiles can include more than twoframes/tiles/sub-tiles (the two frames/tiles/sub-tiles being thecorresponding preceding compressed frame/tile/sub-tile and thecorresponding preceding input frame/tile/sub-tile).

As mentioned above, by way of example, the tiles can be generated by apartitioning module 60 that is implemented as part of the compressionquality evaluation module 50, and the tile quality scores can be pooledby a score pooling module 70 which can also be implemented as part ofthe compression quality evaluation module 50. The partitioning of tilesinto sub-tiles can also be carried out by central components of thedevice 100, such as by the partitioning module 60, or the partitioningof tiles into sub-tile can be performed by the inter-wise qualityevaluation module 90 or by some component that is implemented as part ofthe inter-wise quality evaluation module 90. In a similar manner,sub-tile score can be processed and pooled by the inter-wise qualityevaluation module 90 or by some component that is implemented as part ofthe inter-wise quality evaluation module 90 or by the score poolingmodule 70. As mentioned above, a perceptual weighting module 72 can beimplemented as part of the score pooling module 70 and can be used toprovide more or less weight to certain tiles or areas of the frame, aswas described above.

According to examples of the presently disclosed subject matter, thecompression quality evaluation module can also include a pixeldifference distribution factoring module 74 that is configured tocorrect or implement a factor over the quality score that is computedfor a given compressed candidate frame, when the current input frame hascertain characteristics or is of a certain type. Further according toexamples of the presently disclosed subject matter, the pixel differencedistribution factoring module 74 can be configured to implement thecorrection or factoring in respect of current compressed candidateframes that are characterized by high frequency content that is locatedin very sparse backgrounds. Further details with regard to thecorrection or factor that can be applied by the pixel differencedistribution factoring module 74 are provided below.

Reference is now made to FIG. 5, which is a flowchart illustration of atemporal consistency quality measure computation which can beimplemented as part of a method of controlling a compression of a videoframe, according to examples of the presently disclosed subject matter.In FIG. 5, it is shown, by way of non-limiting example, a process ofcomputing a full-reference pixel-domain quality measure that is appliedto a sub-tiles group that is provided as input (block 505). By way ofexample, each tile in a given tile group can be partitioned to provide aplurality of corresponding sub-tiles groups. Further by way of example,each sub-tile in a sub-tiles group can consist of an m×n (e.g., 8×8)pixels block. According to examples of the presently disclosed subjectmatter, an 8×8 sub-tile pixel block can be used. It would be appreciatedthat in case the input frame sequence is encoded using the H.264standard an 8×8 block size may be desirable or advantageous, since themacroblock and motion partitioning schemes supported in H.264 generallyprovide consistent mode and motion decisions per each aligned 8×8 area.

It would be appreciated that in accordance with examples of thepresently disclosed subject matter, the temporal consistency evaluationmodule 92 can be configured to implement temporal consistency qualitymeasure computation with respect to each one of a plurality of sub-tilegroups which are associated with a given tiles group and/or which areassociated with a given frames group.

At block 510, according to examples of the presently disclosed subjectmatter, the temporal consistency evaluation module 92 can be configuredto compute a measure of differences between each one of the pairs ofsub-tiles from the group. The pairs of sub-tiles from the group ofsub-tiles are the corresponding input and compressed sub-tile. Forexample, if the group of subtitles is comprised of a current candidatecompressed sub-tile, a current input sub-tile, a preceding compressedsub-tile and a preceding input sub-tile, the temporal consistencyevaluation module 92 can be configured to compute a first measure ofdifferences between the current candidate compressed sub-tile and thepreceding compressed sub-tile and a second measure of differencesbetween the current input sub-tile and the preceding input sub-tile.

Further by way of example, the measure of differences calculation caninclude a calculation of absolute differences (“AD”) between pixels inthe sub-tile pairs. According to further examples of the presentlydisclosed subject matter, the consistency evaluation module 92 can beconfigured to calculate a sum of absolute differences (SAD) over thepixels of the sub-tile pairs (e.g., over a m×n pixel block). It would beappreciated that the AD or SAD computation yields two (or more)differences scores (AD or SAD scores) which correspond to the respectivesub-tile pairs.

According to examples of the presently disclosed subject matter, theresults of the differences scores received from the calculation in block510 can be evaluated by the temporal consistency evaluation module 92 todetermine whether both the differences scores are below a perceptualsignificance threshold (block 515). According to examples of thepresently disclosed subject matter, the proposed temporal consistencycomputation can involve a computation of a relation among the results ofthe differences scores. In further examples of the presently disclosedsubject matter, the proposed temporal consistency computation caninvolve a computation of a ratio among the results of the differencesscores. It would be appreciated that a relation or a ratio computationcan highly sensitive to differences score which are lower than a certainthreshold (which is significantly below 1). By way of non-limitingexample, the significant threshold used in block 515 can be in the orderof 0.25 for SAD values.

According to examples of the presently disclosed subject matter, in caseat block 515 it is determined that all (e.g., both) of the differencesscores are below the perceptual significance threshold, the temporalconsistency score for the sub-tile can be set to a predefined value.According to further examples of the presently disclosed subject matter,in case at block 515 it is determined that all (e.g., both) of thedifferences scores are below the perceptual significance threshold, thetemporal consistency score for the sub-tile group (or for thecorresponding current candidate compressed sub-tile) can be determinedaccording to a first formula (block 520) which can be implemented, forexample by the temporal consistency evaluation module 92, for computingthe temporal consistency score when the differences scores are bothbelow the significant threshold.

Further according to examples of the presently disclosed subject matter,in case at block 515 it is determined that at least one of thedifferences scores is above the perceptual significance threshold, arelation between the difference scores can be determined (block 525),and the temporal consistency score calculation can be configuredaccording to the relation between the differences scores (block 530).Still further according to examples of the presently disclosed subjectmatter, once the relation between the differences score is determinedand the temporal consistency score calculation is configuredaccordingly, a temporal consistency score can be calculated for thesub-tile group (or for the corresponding current candidate compressedsub-tile) according to the configuration that was selected (block 535).

There is now provided by way of example a description of a possibletemporal consistency score computation process for a given group ofsub-tiles. According to an example of the presently disclosed subjectmatter, the temporal consistency score calculation can be configuredaccording to both the absolute values of the difference measures foreach sub-tiles pair, as well as according to a relation between thesevalues. For example, if the difference value which corresponds to thedifference between the current input sub-tile and the preceding inputsub-tile is determined to be below a significance threshold, but thedifference value which corresponds to the difference between the currentcandidate compressed sub-tile and the preceding compressed sub-tile isabove the significance threshold, the temporal consistency scorecalculation can be configured such that the temporal consistency scoreis inversely dependant on the difference value which corresponds to thedifference between the current candidate compressed sub-tile and thepreceding compressed subtle. Whereas if both of the differences valuesset forth above exceed the significance threshold, then the temporalconsistency score can be otherwise configured. According to examples ofthe presently disclosed subject matter, when both of the differencesvalues exceed the significance threshold, the temporal consistency scoreconfiguration can depend on the relative size of the differences values.

Increased temporal variation, i.e., where the difference value betweenthe compressed sub-tiles (current candidate and preceding compressed)indicates more temporal variation than the corresponding inputsub-tiles, is perceptually disturbing, and in particular is moreperceptually disturbing than the case of decreased temporal variation,where the temporal variation is reduced after recompression or otherprocessing. Accordingly in some examples of the presently disclosedsubject matter, the temporal consistency calculation can be configuredsuch that the penalty increases, or the obtained score is decreased, forthe case of increased temporal variation. Thus the temporal consistencyscore calculation can be configured differently depending on which ofthe two differences scores is larger.

Furthermore, according to examples of the presently disclosed subjectmatter, if the differences score for the pair of compressed sub-tiles islarger than the differences score for the pair of input sub-tiles, thequality score calculation can have a non-linear relation with the ratioof the two differences scores, whereas if the differences score for thepair of input sub-tiles is larger than the differences score for thepair of compressed sub-tiles, the quality score calculation can bederived via a linear relation.

A non-limiting example of the configuration described above can beimplemented as follows:

If both the differences scores for both the input sub-tile pair and thecompressed sub-tile pair are below a significance threshold (for examplethe significance threshold can be 0.25): set the score according to 1.

According to examples of the presently disclosed subject matter, ratherthan set the temporal consistency score to 1 when the differences (e.g.SAD) values are both below the significance threshold, the temporalconsistency score can instead be calculated essentially according to thefollowing formula:SAD_(r)=1−|SAD_(org)−SAD_(cmp)|  Formula (4)SADr is the sub-tile temporal consistency score, SADorg is the firstdifference value calculated for the input sub-tile pair, SADcmp is thesecond difference value calculated for the compressed sub-tile pair. Inaddition, in case Formula (4) is used, a clipping of the obtainedtemporal consistency score can be implemented, and the clipping can beapplied according to the tile maximum luminance value as follows:

$\begin{matrix}{{\max\;{CF}_{t}} = \left\{ {\begin{matrix}0.1 & {{\max\; V} \geq 128} \\{0.1 + {0.9 \cdot \left\lbrack \frac{128 - {\max\; V}}{128} \right\rbrack}} & {else}\end{matrix};\mspace{79mu}{S_{TC} = {{\min\left( {1,{\max\left( {{\max\;{CF}_{t}},\sqrt{{mean}\left( {S\; A\; D_{r}} \right)}} \right)}} \right)}.}}} \right.} & {{Formula}\mspace{14mu}(5)}\end{matrix}$where, maxV is the maximum luminance value of the TILE, maxCF_(t) is avalue used to clip the temporal consistency score so that it does notdrop below this value, SAD_(r) is the per sub-tile temporal consistencyscore abs S_(tc) is the temporal consistency tile score. It would beappreciated that Formula (5) can be used, since the use of Formula (4)makes the temporal score over-sensitive to substantially small changesin dark frames, and Formula (5) is intended to compensate for thisover-sensitivity.

If only the difference score for the input sub-tiles pair is below asignificance threshold, configure the temporal consistency scorecalculation to depend on an inverse of the differences value of thecompressed sub-tiles pair. For example the following expression can beused:

${{S\; A\; D_{r}} = \frac{0.25}{S\; A\; D_{cmp}}},$where SAD_(r) is the sub-tile temporal consistency score and SADcmp isthe second difference value calculated for the compressed sub-tile pair

If both differences scores exceed the significance threshold, configurethe temporal consistency score calculation to depend on a ratio wherethe denominator is the larger of the two differences values and thenumerator is the smaller of the two differences value, and the ratio canbe taken to a power of alpha, where alpha depends on which of the twodifferences values is larger. (for example alpha=1 for decreasedtemporal variation, and alpha=2 for increased temporal variation).

In both these cases (if only the difference score for the inputsub-tiles pair is below a significance threshold and if both differencesscores exceed the significance threshold), the score of the temporalcomponent can be computed according to the expressionS_(TC)=min(1,√{square root over (mean(SAD_(r)))}).

According to examples of the presently disclosed subject matter, thetemporal consistency calculation process can include a frame scorenormalization measure that can be applied to the overall frame qualityscore. According to examples of the presently disclosed subject matter,the frame score normalization measure can be implemented in order toallow the frame quality score calculation process to operate well withrespect to different types of frames, including for example, the firstframe in a sequence. Referring the first frame in a sequence example, itwould be appreciated that for this frame a temporal consistency scorecannot be calculated (for example, it can be set to 1). For scenechanges (e.g., the first frame of a new scene) a temporal consistencyscore of around 1 can also be expected. In some examples of thepresently disclosed subject matter, the normalization factor can beapplied in order to equalize the score for all frame types—both with“measurable” temporal consistency and without.

According to examples of the presently disclosed subject matter, a framescore normalization measure can be configured to implement thenormalization according to a predefined normalization factor. Accordingto still further examples of the presently disclosed subject matter, theframe score normalization measure can have a plurality ofconfigurations, and can use a plurality of normalization factors, for arespective predefined plurality of frame types. Thus for example theframe score normalization measure can be configured to use a firstnormalization factor for a first frame type and a second normalizationfactor for a second frame type. According to yet further examples, thenormalization factor can be set or modified according to a predefinedcharacteristic of a given current input frame, or according to apredefined characteristic of a preceding input frame. Examples of typesof frames for which the normalization factor can be modified can includeINTRA coded (I) frames vs. INTER coded (P) frames for instance, thefirst frame in the clip as opposed to all the frames that follow. Anexample of the normalization is provided below.

According to examples of the presently disclosed subject matter, theframe score normalization measure can use an equalization factor,EqFact=(approx.)0.95 for the first frame of a scene. The Applicantachieved good results in testing with equalization factor, EqFact=0.95

It would be appreciated that in accordance with examples of thepresently disclosed subject matter, with regard to I-frames and inparticular scene changes, while the temporal component score maycontribute little to assessment of the frame's visual quality, there isno harm in applying it since the SADs in both the original andrecompressed clips are very high, thus providing ratios that are closeto 1, with the equalization correcting any slight shift that wasintroduced.

By way of non-limited example, there is provided a description ofcertain observations by the inventors during the testing of the proposedtemporal consistency quality measure. The observations reflect certainparameters and configuration that we considered to be part of examplesof the presently disclosed subject matter, but other examples and someresults under various circumstances are not necessarily limited to theobservations described now. According to examples of the presentlydisclosed subject matter, the application of the temporal consistencyquality measure revealed a generally lower temporal consistency qualityvalue in areas of localized motion such as moving lips and facialgestures, than in the static background areas, as desired.

It should be noted that some examples of the method of controlling acompression of a video frame according to the presently disclosedsubject matter, including the implementation of the temporal consistencyquality measure computation, are not limited by the example of theinter-wise quality evaluation module 90 and the temporal consistencyevaluation module 92 shown in FIG. 1 and described herein.

Having described certain examples of the presently disclosed subjectmatter which relate to the computation of the inter-frame quality score,there is now provided a description of intra-wise quality measure whichcan optionally be implemented as part of the computation of theintra-frame quality score, according to examples of the presentlydisclosed subject matter. As mentioned above, according to examples ofthe presently disclosed subject matter, the intra-frame quality scorecomputation can include at least a full-reference pixel-domain qualitymeasure computation. The intra-wise quality measures described below caneach be implemented as part of the intra-frame quality score computationin addition to the full-reference pixel-domain quality measurecomputation. Further by way of example, any combination of one or moreof the intra-wise quality measures described below can be implemented aspart of the intra-frame quality score computation in addition to thefull-reference pixel-domain quality measure computation.

According to examples of the presently disclosed subject matter, as partof the intra-frame quality score computation, an added artifactual edgesmeasure can be implemented and a corresponding added artifactual edgesscore can be calculated. According to examples of the presentlydisclosed subject matter, the intra-wise quality evaluation module 120can include an added artifactual edges evaluation module 130 that isadapted to process a pair of frames (a current input frame and a currentcandidate compressed frame) for determining an extent of addedartifactual edges in the current candidate compressed frame (compared tothe corresponding current input frame), and to provide a score whichquantifies the extent of added artifactual edges.

According to examples of the presently disclosed subject matter, theadded artifactual edges measure score can be based on quantifying anextent of added artifactual edges along a video encoding coding blockboundary of the current candidate compressed frame 114 relative to thecurrent input frame 112. According to further examples of the presentlydisclosed subject matter, the extent of added artifactual edges can bedetermined according to a behavior of pixel values across video codingblock boundaries in relation to a behavior of pixel values on eitherside of respective video coding block boundaries. According to stillfurther examples of the presently disclosed subject matter, the extentof added artifactual edges can be determined with respect to adifference frame which corresponds to the (pixel-wise) differencesbetween the current candidate compressed frame 114 and the current inputframe 112, and according to a behavior of pixel values across videocoding block boundaries in the corresponding difference frame inrelation to a behavior of pixel values on either side of respectivevideo coding block boundaries of the difference frame.

According to still further examples of the presently disclosed subjectmatter, added artifactual edges measure can include normalizing theadded artifactual edges score according to an artifactual edgesnormalization factor that is based on the brightness parameter value andon a distribution of the extent of added artifactual edges. In someexamples, the normalization of the added artifactual edges score can becarried out by an artifactual edges normalization module 132 that can beimplemented as part of the added artifactual edges evaluation module130.

Further details with respect to the added artifactual edges measure arenow provided by way of example. According to some examples of thepresently disclosed subject matter, as with the other quality measuresdescribed herein, the frame pair can be partitioned into a plurality oftile pairs. For a given tile pair, a difference tile can be computed andthe added artifactual edges quality measure can be applied to differencetile. Each tile pair can be associated with a respective frame pair, andfor each frame pair a plurality of tile added artifactual edges scorescan be determined. For each tile pair the extent of added artifactualedges can be determined according to a behavior of pixel values acrossvideo coding block boundaries in the corresponding difference tile inrelation to a behavior of pixel values on either side of respectivevideo coding block boundaries of the difference tile.

According to examples of the presently disclosed subject matter,calculating the extent of added artifactual edges for a given tile pairmay include identifying horizontal and vertical block boundaries in thedifference tile. Further by way of example, as part of the calculationof the extent of added artifactual edges, the blocks correspond to thefxg blocks that were used by the encoder when encoding the compressedframe (e.g., the current candidate compressed frame). Thus for example,for H.264 encoding, the block size corresponds to the 16×16 H.264macroblock size.

Further by way of example, for a given block boundary (horizontal orvertical boundary) an inter-block change or a gradient across theblock's border can be evaluated, and a local intra-block gradient withinthe block(s) on either side of the block's border can be evaluated. Forexample, evaluating a local intra-block gradient within the block(s) oneither side of the block's border can include evaluating the differencebetween say the value on the immediate left of the block border and thepixel to its left. According to examples of the presently disclosedsubject matter, the inter-block change or a gradient can be computedbased on the pixel values of the pixels on either side of the border(unless this is a boundary block). According to further examples of thepresently disclosed subject matter, the local intra-block gradient iscomputed based on the pixel values of the pixels which are nearest tothe block border in the blocks on either side of the border.

According to examples of the presently disclosed subject matter, furtheras part of calculating the extent of added artifactual edges for a giventile pair, the inter-block change value can be compared to therespective local intra-block values. According to examples of thepresently disclosed subject matter, the comparison between theinter-block change value and the respective local intra-block values canbe performed by scanning the difference image tile, along the macroblockgrid, e.g. 16×16, and for each point on a horizontal or vertical blockedge checking for the presence of an added artifactual edge. The term“artifactual edge” relates to an edge, —i.e. a local gradient, that is‘significantly’ larger than the gradient on either of its sides (e.g.,the difference is above a certain threshold), which didn't exist in thecorresponding input frame.

Reference is now made by way of example, to FIG. 6, which is a graphicalillustration of the pixel values of two blocks sharing a common(vertical) block boundary. For illustration, a computation that involvesa comparison of the inter-block gradient value with respectiveintra-block gradient values is now described with reference to theblocks shown in FIG. 6, For a vertical edge between the A and B blocks,the computation of a degree of added artifactual edge between A1,16 andB1,1 can include computing a ratio between the change in the pixels inthe difference images across the block border, divided by the averagechange in the pixels on either side of the block border. According toexamples of the presently disclosed subject matter, in order to avoiddivision by zero, a small constant (e.g., 0.0001) can added to thedenominator. This is formulated in Formula (6):

$\begin{matrix}\frac{{B_{1,1} - A_{1,16}}}{\frac{1}{2}\left\lbrack {\left( {{B_{1,2} - B_{1,1}}} \right) + \left( {{A_{1,16} - A_{1,15}}} \right) + 0.0001} \right\rbrack} & {{Formula}\mspace{14mu}(6)}\end{matrix}$

It would be appreciated that the computation in Formula (6) is providedby way of example, and the inter-block and intra-block gradient valuescan be computed using any number of pixels and not just the pixels oneither side of the block edge and/or the two pixels nearest to the blockedge, respectively.

According to examples of the presently disclosed subject matter, a softthresholding of the added artifactual edges value can be implemented aspart of the calculation of the added artifactual edges score. Further byway of example, soft thresholding can enable recognition of a range ofblockiness artifacts. Thus, according to examples of the presentlydisclosed subject matter, given a lower and an upper threshold values:THR_L_(AAE) and THR_H_(AAE), the added artifactual edges scores map, ascore map containing values in the range [0, 1] for each horizontal andvertical border point, can be created as follows:

If the added artifactual edges value, as calculated in Formula (6), isbelow the lower threshold, THR_L_(AAE) the added artifactual edges (AAE)score is set to 0 (no artifact).

If the added artifactual edges value lies between the lower thresholdTHR_L_(AAE) and the higher threshold THR_H_(AAE), the added artifactualedges score can be set to a value in the range [0,1] which is linearlyproportional to the extent of added artifactual edges, i.e.:

$\begin{matrix}\frac{{A\; A\; E} - {THR\_ L}_{AAE}}{{THR\_ H}_{AAE} - {THR\_ L}_{AAE}} & {{Formula}\mspace{14mu}(7)}\end{matrix}$

If the added artifactual edges value exceeds the higher thresholdTHR_H_(AAE) the added artifactual edges score is set to 1.

As an example, for lower and upper threshold values of 2 and 5respectively, the thresholding function shown in FIG. 7 can be obtained,where the X axis denotes added artifactual edges values, and the Y axisdenotes resulting local score values. It would be noted that to savecalculations half the ratio described Eq. (4) can be calculated andthresholds of 2/2 and 5/2 can be used.

According to examples of the presently disclosed subject matter, theadded artifactual edges score, denoted here by S_(AAE), can becalculated as an average over the added artifactual edges scores mapthat include the added artifactual edges score at each edge point. Byway of example, Formula (8) below provides an example of a computationthat can be used for calculating the added artifactual edges score fromthe artifactual edges scores map. In Formula (8) P and Q are thedimensions of the score map, i.e. the number of edge points per row andcolumn respectively.

$\begin{matrix}{S_{AAE} = {1 - {\frac{1}{P \cdot Q}{\sum\limits_{p = 0}^{P = 1}{\sum\limits_{q = 0}^{Q - 1}{{AAESmap}\left( {p,q} \right)}}}}}} & {{Formula}\mspace{14mu}(8)}\end{matrix}$

It would be appreciated that while the computation represented byFormula (8) can provide a good indication as to presence of perceptuallyvisible edges, further processing may be required in order to quantifythe extent of degradation. For example, very disturbing visible edges,where the block on either side of the edge is ‘flat’ and there is achange at the block edge, can receive according to Formula (8) an addedartifactual edges score of 1, which is the score that a much lessdisturbing blockiness artifact which also exceeds the higher thresholdTHR_H_(AAE) may yield.

Thus, according to examples of the presently disclosed subject matter, apenalty can be added to the added artifactual edges score computation.Further by way of example, the penalty can be applied for the case ofadded artifactual edges values which are larger than a qualitativethreshold, and whose number is larger than a quantity threshold.

Still further according to examples of the presently disclosed subjectmatter, a further measure can be implemented to control the applicationof the penalty, to avoid, for example, over-penalizing of certain tiles.According to examples of the presently disclosed subject matter, thepenalty can be applied to tiles that are both dark (e.g., maxV<<128) andhave ‘problematic’ distributions such as ‘titles’ frames, may bepenalized twice and thus have low scores even when their quality is veryhigh. Further by way of example, the penalty control measure can beconfigured to control the application of the penalty with respect toblocks that are both particularly dark and also have a particularly highvalue of added artifactual edges.

Therefore, the allowed range for the added artifactual edges scorecorrection factor can be set, based on maxV, which is a maximum lumavalue in the evaluated tile. This maxV value that can be used forsetting the allowed range for the added artifactual edges scorecorrection factor can be the same value as the maximum luma value whichwas already described above in connection with the description ofFormula (2), and in this case, the value in Formula (2) can be used inthe current computation as well. According to examples of the presentlydisclosed subject matter, the allowed range for the added artifactualedges score correction factor can be determined, for example, using thefollowing Formula (9):

$\begin{matrix}{{AAE\_ CF}_{\max} = \left\{ \begin{matrix}0.65 & \begin{matrix}{{\max\; V} \geq 128} \\\left( {{no}\mspace{14mu}{\,{‘{{darkness}\mspace{14mu}{correction}}’}}} \right)\end{matrix} \\{0.65 + {0.35 \cdot \left( \frac{128 - {\max\; V}}{128} \right)}} & {otherwise}\end{matrix} \right.} & {{Formula}\mspace{14mu}(9)}\end{matrix}$

According to further examples of the presently disclosed subject matter,assuming Formula (9) is used to control allowed range for the addedartifactual edges score correction factor, the correction factor can becalculated, as an example, using Formula (10):

$\begin{matrix}{{AAE\_ CF} = {\max\left( {{{AAE\_}{CF}}_{\max},{\min\left( {1,{0.25 + \frac{1000 \cdot P \cdot Q}{\sum\limits_{p = 0}^{P = 1}{\sum\limits_{q = 0}^{Q - 1}{{AAESmap}\left( {p,q} \right)}}}}} \right)}} \right)}} & {{Formula}\mspace{14mu}(10)}\end{matrix}$

It would be appreciated that if the added artifactual edges value isvery high, added artifactual edges score map values of ˜1000 can result,and therefore a correction factor which is below 1 can be obtained.

Following the computation of the correction factor, the addedartifactual edges score component can be corrected using the calculatedcorrection factor, for example, as follows:S _(AAE) =S _(AAE)×AAE_CF  Formula (11)

In this example, the added artifactual edges score is in the range [0,1]with 1 indicating no added artifactual edges in the target image tile,and the lower the value—towards 0, the more added artifactual edges havebeen found to be present.

According to examples of the presently disclosed subject matter, as partof the intra-frame quality score computation, a texture distortionmeasure can be implemented and a texture distortion score can becalculated. According to examples of the presently disclosed subjectmatter, the texture distortion measure score can be based on texturevalues associated with the current candidate compressed frame 114relative to the current input frame 112.

According to examples of the presently disclosed subject matter, thetexture distortion measure can be based on relations between texturevalues in the current candidate compressed frame 114 and in thecorresponding current input frame 112. According to examples of thepresently disclosed subject matter, the intra-wise quality evaluationmodule 120 can include a texture distortion evaluation module 140 thatis adapted to process a pair of frames (a current input frame and acurrent candidate compressed frame) for determining an extent of texturedistortion in the current candidate compressed frame (compared to thecorresponding current input frame), and to provide a score whichquantifies the extent of texture distortion. According to furtherexamples of the presently disclosed subject matter, each texture valuecorresponds to a variance of pixel values within each one of a pluralityof predefined pixel groups in the candidate compressed frame 114 and ineach respective pixel group in the corresponding current input frame112.

According to further examples of the presently disclosed subject matter,the texture distortion measure can include implementing texturedistortion sensitivity thresholds. Further by way of example, thetexture distortion measure can include applying texture distortionsensitivity thresholds to the relations between texture values in thecurrent input frame and in the corresponding candidate compressed frame.Still further by way of example, the texture distortion sensitivitythresholds can be configured to provide a non-linear texture distortionscore mapping that is based on the texture distortion sensitivitythresholds. Further by way of example, one or more of the texturedistortion sensitivity thresholds can be adapted according to pixel-wisedifferences. Still further by way of example, the pixel-wise differencesthat are used for determining or adapting one or more of the texturedistortion sensitivity thresholds can be based on the pixel-wisedifference score that was calculated for the respective tile as a resultof the pixel-wise quality evaluation process that was described above,for example with reference to FIGS. 2-4. It would be appreciated thatusing the same pixel-wise difference score that was calculated for therespective tile as a result of the pixel-wise quality evaluation processfor setting the thresholds for the entire tile as part of the texturedistortion evaluation process for the plurality of predefined pixelgroups.

According to examples of the presently disclosed subject matter, thetexture distortion evaluation module 140 can include a texturedistortions thresholds configurator 142 that is adapted to determine oradapt one or more of texture distortion sensitivity thresholds that areto be used as part of the texture distortion evaluation process. By wayof example, the texture distortions thresholds configurator 142 can beconfigured to determine the texture distortions thresholds that are tobe used according a result of the pixel-wise quality evaluation process,as mentioned above.

Further details with respect to the texture distortion measure are nowprovided by way of example. According to some examples of the presentlydisclosed subject matter, as with the other quality measures describedherein, the frame pair can be partitioned into a plurality of tilepairs. According to examples of the presently disclosed subject matter,as part of the implementation of the texture distortion measure a tilepair can be further partitioned into a plurality of sub-tiles. Asub-tile can have a dimension of M×N. For instance, sub-tiles of size4×4 can be used.

According to examples of the presently disclosed subject matter, a meanpixel value can be computed for a given sub-tile pair. For illustration,I_(R)(m,n) and I_(T)(m,n) are used, where I_(T) is associated with asub-tile from the current candidate compressed frame and I_(R) isassociated with a corresponding sub-tile from the current input frame,and the mean pixel values computation is represented, as an example, byFormula (12):

$\begin{matrix}{{{MEAN}_{I}\left( {m,n} \right)} = {\frac{1}{M \cdot N}{\sum\limits_{k = k_{m}}^{k_{m} + M}{\sum\limits_{l = l_{n}}^{l_{n} + N}{I\left( {k,l} \right)}}}}} & {{Formula}\mspace{14mu}(12)}\end{matrix}$

Then, corresponding sub-tile pair variance values are computed, forexample using the computation represented by Formula (13):

$\begin{matrix}{{{VAR}_{I}\left( {m,n} \right)} = {\frac{1}{M \cdot N}{\sum\limits_{k = k_{m}}^{k_{m} + M}{\sum\limits_{l = l_{n}}^{l_{n} + N}{{{I\left( {k,l} \right)} - {{MEAN}_{I}\left( {m,n} \right)}}}}}}} & {{Formula}\mspace{14mu}(13)}\end{matrix}$

The sub-tile pair variance values computation can be followed by acalculation of the variance ratio, and corresponding 1's compliment.This computation is represented by Formula (14):

$\begin{matrix}{{{{{VarR}_{I}\left( {m,n} \right)} = \frac{{{VAR}_{I_{R}}\left( {m,n} \right)} + C}{{{VAR}_{I_{T}}\left( {m,n} \right)} + C}};}{{{VarR}_{I}1c} = {1 - {{VarR}_{I}\left( {m,n} \right)}}}} & {{Formula}\mspace{14mu}(14)}\end{matrix}$Where C is a constant that is used to avoid division by 0. For example,C=2. It would be appreciated, that as a general rule, the larger C is,the more slight variance changes around 0 are ignored.

Now, for each sub-tile pair a local texture distortion score cancalculated as a function of the variance ratios, for example using thecomputation represented, as an example, by Formula (15):

                                     Formula  (15)${S_{TD}\left( {m,n} \right)} = \left\{ \begin{matrix}0 & {\mspace{11mu}\begin{matrix}{{if}\mspace{14mu}\left( {{VarR}_{I} > {{THR}_{TD}H}} \right)\mspace{14mu}{or}} \\\left( {{VarR}_{I} < {{THR}_{TD}L}} \right)\end{matrix}\;} \\1 & {{{{VarR}_{I}1c}} < {{THR}_{TD}O}} \\\left( {1 - \frac{{{VarR}_{I}1c} - {{THR}_{ID}O}}{1 - {{THR}_{TD}L} - {{VarR}_{I}1c}}} \right)^{2} & {{{VarR}_{I}1c} > 0} \\\left( {1 + \frac{{{VarR}_{I}1c} + {{THR}_{ID}O}}{{{THR}_{ID}H} - 1 - {{VarR}_{I}1c}}} \right)^{2} & {{{VarR}_{I}1c}<=0}\end{matrix} \right.$Where the constants defining the high and low thresholds denoted byTHRtdL and THRtdH for the ratio, and the allowed offset or deviationfrom ratio=1 denoted by THRtdO are set according to the previouslycalculated pixel-wise difference score. This computation is represented,as an example, by Formula (16):if (S _(PWD)>0.85)THR_(TD) H=5;THR_(TD) L=0.2;THR_(TD) O=0.2;elseTHR_(TD) H=1.4;THR_(TD) L=0.6;THR_(TD) O=0.1  Formula (16)

According to examples of the presently disclosed subject matter, thecomputation represented by Formula (16) can result in a thresholdingfunction. A graphical illustration of an example of a thresholdingfunction which can be implemented as part of the texture distortionmeasure is presented in FIG. 8.

The texture distortion measure computation, a computation of an overalltexture distortion score can be computed by averaging the values ofS_(TD) from Formula (15) over all M×N blocks within the W×H tile pair.This computation is represented, as an example, by Formula (17):

$\begin{matrix}{S_{TD} = {\frac{M*N}{W*H}{\sum\limits_{m = 1}^{W/M}{\sum\limits_{n = 1}^{H/N}{S_{TD}\left( {m,n} \right)}}}}} & {{Formula}\mspace{14mu}(17)}\end{matrix}$

Further as part of the texture distortion measure computation acorrection can be applied to the overall texture distortion score.According to examples of the presently disclosed subject matter, thecorrection factor computation can be carried out by a texturedistortions normalization module 144 that is implemented as part of thetexture distortion evaluation module 140. According to examples of thepresently disclosed subject matter, the correction that is applied tothe overall texture distortion score can be configured to emphasize adisturbing artifact that is associated with a consistent texture lossover large parts of a tile. Further by way of example, the correctioncan be configured according to a correction factor that is based on aratio of an average variance in the current input tile and the currentcandidate compressed tile. An example of a computation of a correctionfactor that can be used to configure a correction that can beimplemented as part of a texture distortion measure computation isprovided by Formulae (18) and (19):

$\begin{matrix}{\mspace{85mu}{{{{{VAR}_{I}{avg}} = {\frac{1}{M*N}{\sum\limits_{m}^{\;}{\sum\limits_{n}^{\;}{{VAR}_{I}\left( {m,n} \right)}}}}};}\mspace{79mu}{{VARavgR} = \frac{{VAR}_{I_{R}}{avg}}{{VAR}_{I_{T}}{avg}}}}} & {{Formula}\mspace{14mu}(18)} \\{{TD\_ CF} = \left\{ \begin{matrix}1 & {{VARavgR} < 1.5} \\{\max\left( {{TD\_ CF}_{\max},{\frac{2}{3}{VARavgR}}} \right)} & {otherwise}\end{matrix} \right.} & {{Formula}\mspace{14mu}(19)}\end{matrix}$

According to examples of the presently disclosed subject matter, thetexture distortion measure computation can include a thresholdTD_CF_(max) that is implemented as part of the correction factorcomputation to prevent over-correction of a current candidate compressedtile that suffers from multiple disturbing artifacts. Further by way ofexample, TD_CF_(max) can be determined according to or in a manner whichcorresponds to the computations of the correction factors for thepixel-wise difference measure and the added artifactual edges measure.For example, TD_CF_(max) can be determined according to Formula (20):

                                     Formula  (20)${TD\_ CF}_{\max} = \left\{ \begin{matrix}0.25 & \begin{matrix}{{\max\; V} \geq {128\mspace{14mu}{and}}} \\{{AAE\_ CF}==1}\end{matrix} \\{0.25 + \left( {1 - {AAE\_ CF}} \right)} & {{\max\; V} \geq 128} \\{0.25 + {0.25 \cdot \left( \frac{128 - {\max\; V}}{128} \right)} + \left( {1 - {AAE\_ CF}} \right)} & {otherwise}\end{matrix} \right.$

As will be described further below, the texture distortion score can becombined into the overall compressed candidate frame/tile quality scorewith an exponent of 0.5, so when limiting the correction factor TD_CF to0.25, the actual correction factor of the overall tile compressedcandidate frame/tile quality score can be limited to sqrt(0.25)=0.5. Asa final stage of the texture distortion measure computation, the overalltexture distortion score can be corrected, for example, according to thecomputation represented by Formula (21):S _(TD) =S _(TD)×TD_CF  Formula (21)

The result of Formula (21) is a score in the range [0,1] with 1indicating no visible texture distortion in the target image tile.

According to examples of the presently disclosed subject matter, as partof the intra-frame quality score computation, an edge loss measure canbe implemented and an edge loss score can be calculated. The computationof the edge loss measure can be carried out by an edge loss evaluationmodule 150 that is implemented as part of the intra-wise qualityevaluation module 80. According to examples of the presently disclosedsubject matter, the edge loss score computation can include obtaining anedge map corresponding to the current input frame and computing the edgeloss score based on the edge map corresponding to the current inputframe. For example, the edge loss score computation can include:obtaining an edge map corresponding to the current input frame,computing for each edge pixel in the current input frame an edgestrength score based on a deviation between a value of an edge pixel andone or more pixels in the proximity of the edge pixel, computing foreach corresponding pixel in the candidate compressed frame an edgestrength score based on a deviation between a value of the correspondingpixel and one or more pixels in the proximity of the correspondingpixel, and the edge loss score is calculated based on a relation amongthe edge strength score of the edge pixel and the edge strength score ofthe corresponding pixel.

According to further examples of the presently disclosed subject matter,the edge loss score computation can include obtaining an edge mapcorresponding to the current input frame and obtaining an edge mapcorresponding to the candidate compressed frame. For example, the edgeloss score computation can include: obtaining an edge map correspondingto the current input frame, obtaining an edge map corresponding to thecandidate compressed frame and calculating an edge loss score based on aloss of edge pixels according to a difference between the edge mapcorresponding to the current input frame and the edge map correspondingto the candidate compressed frame.

Further details with respect to the edge loss measure are now providedby way of example. According to some examples of the presently disclosedsubject matter, as with the other quality measures described herein, theframe pair can be partitioned into a plurality of tile pairs, and theedge loss measure can be applied to the tile pairs, and edge loss scoresfor the tiles that are associated with a given frame can be pooledtogether.

According to examples of the presently disclosed subject matter, theedge loss measure can include a computation of a binary edge map foreach current input frame or for each tile of a current input frame.Further by way of example, the edge map computation can be implementedas a preliminary, pre-processing stage. Still further by way of example,the binary edge map is generated by providing a value of 1 in the edgemap for an edge pixel. Yet further by way of example, an edge detectionalgorithm such as Canny edge detection, Sobel edge detection,log-laplacian edge detection, Prewitt Roberts edge detection or anyother edge detection algorithm can be used.

According to examples of the presently disclosed subject matter, inaddition to providing in the edge map a binary indication for an edgepixel, for each edge pixel the edge ‘direction’ can be determined.Further by way of example, determining a direction of an edge pixel caninclude the following: assuming an edge at location {i, j}, calculatingan absolute difference between the pixel value at {i, j} and each of thesurrounding pixels (e.g., eight surrounding pixels), comparing theabsolute differences, and setting ED_(org)(i,j) according to a locationof the pixel that produced the largest absolute difference with thepixel at {i, j}. An example of a schematic enumeration of the pixelssurrounding the pixel at {i, j} is illustrated in FIG. 9A, which incombination with the schematic illustration of the respective pixelvalues (edge pixel is bolded) in FIG. 9B and corresponding absolutedifferences values (maximum value is bolded) in FIG. 9C demonstrate thecase for a diagonal edge, where ED_(org)(i,j)=3.

According to examples of the presently disclosed subject matter, in oneimplementation of the edge loss measure computation, in order tocalculate the edge loss score (or ELF), the following data can beobtained:

F_(cmp): The current candidate compressed frame/tile;

F_(org): The current input frame/tile;

EM_(org): A binary edge map corresponding to F_(org).

ED_(org): The “direction” of each edge point, indicated by values in therange 0-7 representing the pixels surrounding the respective edge pixel.

Using the above data, for each tile an edge loss score can becalculated. The edge loss score can be used as an indication of anextent (e.g., a percent) of the edge loss among edge pixels. Edge losscan be defined and can be calculated using the following algorithm:

set N_(e)=0; N_(elf)=0; N_(e) denotes the number of edges and N_(elf)denotes the number of edge loss points for each pixel in the tile, if itis an edge pixel:

set N_(e)=N_(e)+1;

calculate the edge absolute difference value, where the absolutedifference between the edge pixel (the value of the pixel in the frame)and the pixel (in the frame) indicated by the corresponding value inED_(org), in both the current input tile and in the current candidatecompressed tile to obtain EAD_(org)(i,j), EAD_(cmp)(i,j).

In an example according to the pixels block shown in FIGS. 9A-9C, theapplication of the above algorithm would translate to:EAD _(org)(i,j)=|F _(org)(i,j)−F _(org)(i,j−1))|=101;EAD _(cmp)(i,j)=|F_(cmp)(i,j)−F _(cmp)(i,j−1))|.If EAD _(cmp)(i,j)≦½*EAD _(org)(i,j) then N _(elf) =N _(elf)+1  Formula(22).

In yet another example, N_(elf), which denotes the extent of lost edgeinformation for the edge pixels in the tile, can be computed as follows:a per pixel edge loss measure may be calculated by:

$\begin{matrix}{{edgeLossMeasure} = \frac{{EAD}_{cmp}}{{EAD}_{org} + C}} & {{Formula}\mspace{14mu}(23)}\end{matrix}$where C is a small constant to avoid division by 0, for instanceC=0.0001.

Then for each edge pixel, N_(elf) is updated as follows: if there ispotentially an edge loss as indicated by a predefined edge losscriterion, for instance the edge loss criterion can beedgeLossMeasure≦0.5 or a similar criterion, then: if the edge has beencompletely eradicated as indicated by a predefined edge eradicationcriterion, for example the eradication criterion can be EAD_(cmp)==0, ora similar criterion, then N_(elf) is computed accumulatively as follows:

$\begin{matrix}{N_{elf} = {N_{elf} + {\min\left\{ {1,{50 \cdot \frac{{EAD}_{org}}{\max\left\{ {{{edge}\mspace{14mu}{pixel}\mspace{14mu}{value}},{{furthest}\mspace{14mu}{neight}}} \right.}}} \right.}}} & {{Formula}\mspace{14mu}(24)}\end{matrix}$

Otherwise, if edge was only partially lost, then N_(elf) is computedaccumulatively as follows:Nelf  Formula (25)This means that for edges that are completely lost, there is a greaterleniency if the pixel values are very high (e.g., for bright pixels).Otherwise, the error is directly related to the extent of edge lossrather than always being 1 as in the previous example.

The computation above is carried out for all the edge pixels in thetile. The next computation is applied after having “scanned” all edgepixels in the tile.

$\begin{matrix}{{{{{If}\mspace{14mu} N_{e}} > 0},{S_{ELF} = {\max\left( {0.4,{1 - \frac{N_{elf}}{N_{e}}}} \right)}},{{otherwise}\text{:}}}{S_{ELF} = 1.}} & {{Formula}\mspace{14mu}(26)}\end{matrix}$

In another example the above computation, depicted in Formulae 23-25 canbe performed only for certain edge pixels, while excluding other edgepixels. According to examples of the presently disclosed subject matter,the edge pixels selection criterion can be associated with a predefinedcharacteristic (or characteristics) of the found edge in the image. Byway of example, the edge score described below can be included in theedge pixels selection criterion, and a threshold can be implemented todetermine, according to each edge pixel's edge score, whether to applythe computations associated with Formulae 23-25 mentioned above or not.In a further example, the edge pixels selection criterion can beassociated with a measure of the length of the edge, where for pixelsthat are part of an edge that includes less than a certain (e.g.,predefined) number of pixels, the computations associated with Formulae23-25 can be avoided for the respective edge pixels In yet a furtherexample, the edge pixels selection criterion can be associated with ameasure of the “strength” of the edge, which can be measured for exampleas a function of the numerical absolute difference between pixel valueson either side of the edge. The criterion based on “strength” of theedge can include some (e.g., a predefined) threshold, and if the measureof the “strength” of the edge is less than a certain value, thecomputations associated with Formulae 23-25 can be avoided for therespective edge pixels.

According to examples of the presently disclosed subject matter, theedge loss measure computation can be configured to provide an edge lossscore within a limited range. For example, in the above example, theedge loss measure computation is configured to provide an edge lossscore in the range [0.4, 1] with 1 indicating no edge loss, and 0.4indicating severe edge loss. In this example, the score to is limitedfrom below to 0.4 to support of graceful quality degradation, such thateven when edges are not preserved well, an overall quality which is notperceptually lossless but still acceptable for some applications can beobtained. It would be appreciated that in further examples of thepresently disclosed subject matter the edge loss measure can beconfigured to include a soft thresholding, which can be implemented aspart of the edge loss score computation instead of the hard thresholdingdescribed above. By way of example, a soft threshold that is implementedas part of the edge loss measure computation can be configured using0.5, and lower bound limit.

The inventors discovered that introducing the edge loss score componentto the tile score computation (as explained below) can cause an averagedrop in overall frame quality score by a factor of about 0.9. The dropin overall frame quality score can be a result of multiplying all theprevious scores by another component which generally is smaller than 1.The more score components there are the lower the obtained score will befor the same actual quality. Thus, according to examples of thepresently disclosed subject matter, in case the edge loss measure isimplemented as part of the quality evaluation process, the overall framequality score can be normalized. For example, the overall frame qualityscore can be normalized as follows:

$\begin{matrix}{{BBvCQ} = {\min\left( {1,\frac{BBvCQ}{0.9}} \right)}} & {{Formula}\mspace{14mu}(27)}\end{matrix}$Where BBvCQ denotes the overall frame quality score.

Having described examples of the presently disclosed subject matterwhich relate to the computation of an inter-frame quality measure andexamples of an intra-frame quality measures, there is now provided adescription of computing a frame quality score for the current candidatecompressed frame based on the intra-frame and the inter-frame qualityscores. According to examples of the presently disclosed subject matter,the frame quality score that is computed from the intra-frame and theinter-frame quality scores can be evaluated against a quality criterionto determine whether the quality criterion is satisfied or not. In casethe quality criterion is not satisfied the compression process can berepeated using an updated quantizer parameter value giving rise to anupdated candidate compressed frame. The quality evaluation processdescribed herein, including the computation of the inter-frame qualityscore and the intra-frame quality score can be repeated for the updatedcandidate compressed frame, and the updated candidate compressed framecan be evaluated again, until for a certain current candidate compressedframe the quality criterion is met. According to examples of thepresently disclosed subject matter, when the quality criterion is met,the compression quality evaluation module can be configured to instructthe encoder to provide the current candidate compressed frame as output.

There is now provided a description of a possible implementation of acomputation for pooling or combining the intra-frame and the inter-framequality scores. As mentioned above, the intra-frame quality score can beassociated at least with a pixel-wise difference quality measure. As wasalso mentioned above, in addition to the pixel-wise quality measure, theintra-frame quality score can optionally also be associated with one ormore of the following intra-wise quality measures: an added artifactualedges measure, a texture distortion measure or an edge loss measure.According to examples of the presently disclosed subject matter, theintra-frame quality score need not necessarily be explicitly calculatedand the intra-wise quality measure's or measures' score(s) can be feddirectly to the pooling function. Further by way of example, the poolingof the scores can take place at the tile level, and the resulting tilescores can be combined to provide the overall frame quality score forthe current candidate compressed frame.

According to examples of the presently disclosed subject matter, thepooling function that is used to calculate the overall tile score caninclude an exponent for each of the tile quality measures that are to bepooled. According to further examples of the presently disclosed subjectmatter, the exponents can be predefined. For example, a pooling functionwhich can be used to calculate the overall tile score is provided by wayof example below as Formula 28:BBvCQ=(S _(PWD))^(α)·(S _(AAE))^(β)·(S _(ID))^(γ)·(S _(TC))^(μ)·(S_(ELF))^(η)  Formula (28)where BBvCQ denotes the overall tile quality score, S_(PWD) denotes thepixel wise difference score that was calculated for the tile, S_(AAE)represents the added artifactual edges score, S_(TD) represents thetexture distortion score, S_(TC) denotes the temporal consistency score,and S_(ELF) denotes the edge loss score. By way of examples, theexponents are α=1.5, β=1, γ=0.5, μ=1, η=0.5.

The overall tile scores for all the tiles that are associated with acurrent compressed candidate frame (or with a corresponding frame group)can be thus calculated. Once the overall tile scores for all the tilesthat are associated with a current compressed candidate frame arecalculated, the tile scores can be pooled to provide an overall framequality score. The frame quality score relates to the current compressedcandidate frame.

There is now provided a non-limiting description of various tile sizeconfigurations which can be used as part of some examples of thepresently disclosed subject matter.

According to examples of the presently disclosed subject matter, inorder to increase score robustness for different image sizes, anadaptive tile dimension selection scheme can be implemented. Accordingto examples of the presently disclosed subject matter, the tiledimension selection scheme can be configured to select a tile size thatis a multiple of 16 (macroblock size). According to further examples ofthe presently disclosed subject matter, the tile dimension selectionscheme can be configured to select a tile size that is 64×64 in size orabove. The inventors have discovered that tiles which are smaller than64×64 can cause unstable results, possibly due the small size of theresulting PSNR sub-tiles, and in case the added artifactual edgesmeasure is implemented as part of the evaluation process, in tiles whichare smaller than 64×64, it is also possible that there would be a smallamount of available 16×16 edges, and this can hamper evaluation of theadded artifactual edges.

The inventors also discovered that for resolutions of approximatelyaround Full HD (1920×1080 pixels), the maximum tile size should be 128.It is possible that for larger tiles, the sensitivity of the qualitymeasures can be diminished due to the number of pixels in the tile.

It would be appreciated that in some examples of the presently disclosedsubject matter, tile size need not be square. However in other examplesof the presently disclosed subject matter, square tiles are used.

In further examples of the presently disclosed subject matter,approximately 50 tiles per frame are used for evaluating each currentcandidate compressed frame, but still further examples of the presentlydisclosed subject matter are not limited to this particular tiles perframe figure.

In order to illustrate a possible frame partitioning scheme, there isnow provide a non-limiting example of a computation this can be used todetermine the partitioning of a video frame having a standard aspectratio of 4:3, with at least 6 rows 8 columns of tiles:

$\begin{matrix}{{TileDim} = {\min\left( {\frac{\min\left( {F_{width},F_{height}} \right)}{6},\frac{\max\left( {F_{width},F_{height}} \right)}{8}} \right)}} & {{Formula}\mspace{14mu}(29)}\end{matrix}$where TileDimdenotes the tile dimension and F_(width), F_(height) referto the frame width and height respectively.

TileDimis then snapped to a grid of 16, and clipped as follows:

$\begin{matrix}{{TileDim} = {\min\left\{ {128,{\max\left\lbrack {64,{16 \cdot {{floor}\left( \frac{TileDim}{16} \right)}}} \right\rbrack}} \right\}}} & {{Formula}\mspace{14mu}(30)}\end{matrix}$

Once a quality score is calculated for each of the tiles of a givenframe (each tile dimension is TileDim×TileDim), the tile scores can bepooled to provide a single frame score. The inventors discovered thatcalculating the scores over image tiles and then pooling the results,yields a frame quality measure that is robust to different image sizesand contents.

According to some examples of the presently disclosed subject matter,pooling the tile scores to provide an overall frame score can include:

Finding a lowest tile score (score of worst behaving tile) denotedS_(min), setting a threshold for tile scores to be included incalculation for example:THR_(S)=min(0.95,2.5*S _(min))  Formula (31)if S_(min)≧THR_(S), i.e., there are no scores below 0.95, the framescore is set to S_(min), otherwise the score for the frame is calculatedas the average between S_(min) and the average of all tile scores thatare below THR_(s).

It would be appreciated that the proposed pooling procedure can be usedto emphasize (or give a higher weight to) the worst tile in the currentcandidate compressed frame. It would also be appreciated that the worsttile is typically where the subjective viewer would be drawn to. Theproposed pooling procedure can also provide for integration of thescores over the frame, while excluding high quality ‘outliers’, i.e.,tiles with particularly high quality compared to the worst case tile.

In addition to the frame quality evaluation process described above,additional or other measures can be included in the method ofcontrolling a compression of a video sequence and can be implemented bythe device for controlling a compression of a video sequence. Suchadditional or other measures can be configured to operate with respectof particular frames with specific characteristics. Frames that arecharacterized by high frequency content that is located in very sparsebackgrounds, ‘titles’ frame, or dark fade-in and fade-out frames areexamples of frames that requires other or additional process andevaluation due to the specific characteristics of such frame.

According to examples of the presently disclosed subject matter, in suchframes, due to the lack of detail, the Human Visual System (HVS) tendsto focus on small areas where content is present, a behavior which canaffect subjective evaluation of the candidate compressed frame'squality. According to examples of the presently disclosed subjectmatter, as part of the quality evaluation process, a penalty which isdependent on the extent of “variance” in sub-tile PSNR values in theframe tiles can be added to the frame quality score. Further by way ofexample, the penalty can be calculated as follows:

for each tile in the frame:

$\begin{matrix}{{{psnrMinMaxR}\left( {k,1} \right)} = \left\{ \begin{matrix}{- 1} & {{if}\left( {T_{R} = T_{T}} \right)} \\\frac{\min\left\lbrack {{psnrST}\left( {i,j} \right)} \right\rbrack}{0.000001 + {\max\left\lbrack {{psnrST}\left( {i,j} \right)} \right\rbrack}} & {otherwise}\end{matrix} \right.} & {{Formula}\mspace{14mu}(32)}\end{matrix}$where (k,l) are the tile indices and (i,j) are the sub-tile indices.psnrMinMaxR(k,l): denotes a ratio between the minimum and maximumsub-tile PSNR values and is required for the calculation below,psnrST(i,j)-denotes the sub-tile PSNR as defined above, T_(R) thereference (original) tile and T-denotes the target (recompressed) tile.

Then, after calculating the overall frame score S_(F), it can becorrected by a corresponding global correction factor, G_CF, forexample, as follows:

set R_(max) to max (psnrMinMaxR(k,l)); R_(max) is the maximum PSNRmin/max ratio in the frame.

if R_(max) exceeds (−1) a score correction factor can be calculate asfollows:

set R_(avg) to the average of all psnrMinMaxR(k,l) values that are notequal to (−1).G_CF=0.6+0.75*R _(avg)  Formula (33)clip the correction factor to the range [0.65, 1].S _(F) =G_CF*S _(F)  Formula (34)

It will also be understood that the device according to the inventioncan be a suitably programmed computer. Likewise, the inventioncontemplates a computer program being readable by a computer forexecuting the method of the invention. The invention furthercontemplates a machine-readable memory tangibly embodying a program ofinstructions executable by the machine for executing the method of theinvention.

The invention claimed is:
 1. A method of controlling a video contentsystem based on an input video sequence and a corresponding degradedvideo sequence, the input video sequence including at least a currentinput frame and a preceding input frame, and the degraded video sequenceincluding at least a current degraded frame and a preceding degradedframe, the method comprising: obtaining the current input frame, thepreceding input frame, the current degraded frame and the precedingdegraded frame; computing a first differences value from the currentinput and the preceding input frames and a second differences value fromthe current degraded frame and the preceding degraded frame; comparingthe first and second differences values giving rise to an inter-framequality score; computing an intra-frame quality score using anintra-frame quality measure that is applied in the pixel-domain of thecurrent degraded frame and the current input frame; and providing aconfiguration instruction to the video content system based on a qualitycriterion related to the inter-frame and the intra-frame quality scores;wherein the degraded video sequence is a compressed video sequencecorresponding to the input video sequence, providing a compressionparameter value, wherein: said obtaining comprises, obtaining acandidate compressed frame generated from a current input frameaccording to the compression parameter value and for each current inputframe and candidate compressed frame providing a stored compressed framecorresponding to the preceding input frame; wherein said computing afirst differences value comprises computing a first differences valuefrom the current input and the preceding input frames, and wherein saidcomputing a second differences value comprises computing a seconddifferences value from the candidate compressed frame and the storedcompressed frame, and comparing the first and second differences valuesgiving rise to an inter-frame quality score; wherein said computing anintra-frame quality score comprises computing an intra-frame qualityusing an intra-frame quality measure that is applied in the pixel-domainof the candidate compressed frame and the current input frame, andwherein in case a quality criterion related to inter-frame andintra-frame quality is not satisfied, instructing the video encoder torepeat a compression process using an updated compression parametervalue giving rise to an updated candidate compressed frame and computingthe inter-frame quality score and the intra-frame quality score based onthe updated candidate compressed frame, and computing a frame qualityscore for the current candidate compressed frame based on theintra-frame and the inter-frame quality scores, and wherein the qualitycriterion is related to the frame quality score.
 2. The method accordingto claim 1, further comprising: partitioning each of the current inputframe, the preceding input frame, the candidate compressed frame and thestored compressed frame into corresponding tiles; calculating anintra-tile and an inter-tile quality scores for each set ofcorresponding tiles; computing perceptually driven weights for theintra-tile and the inter-tile quality scores; and pooling the tilescores giving rise to the frame quality score.
 3. The method accordingto claim 2, wherein said computing an intra-frame quality score furthercomprises: partitioning a current input frame tile and a correspondingcandidate compressed frame tile, giving rise to a plurality of sub-tilepairs; computing an intra sub-tile quality score for each one of theplurality of sub-tile pairs; computing a perceptually driven weight foreach one of the plurality of sub-tile pairs giving rise to a pluralityof weighted intra sub-tile quality scores; and pooling the plurality ofweighted intra sub-tile quality scores into a corresponding plurality ofintra-tile quality scores.
 4. The method according to claim 2, whereinsaid computing an inter-frame quality score further comprises:partitioning each tile from a set of corresponding tiles consisting of acurrent input frame tile, a preceding frame tile, a candidate compressedframe tile and a stored compressed frame tile into two or moresub-tiles, giving rise to two or more sub-tile groups; computing aninter sub-tile score for each of the two or more sub-tile groups; andpooling the two or more inter sub-tile scores into a correspondinginter-frame tile quality score.
 5. The method according to claim 1,wherein said computing an intra-frame quality score further comprisesusing a full-reference pixel-domain quality measure, wherein the inputframe is the pixel domain reference.
 6. The method according to claim 5,wherein said computing an intra-frame quality score comprises, computingan intra-frame quality score based on a pixel-wise difference betweenthe input frame and the candidate compressed frame.
 7. The methodaccording to claim 6, wherein said computing an intra-frame qualityscore further comprises normalizing the intra-frame quality score basedon a brightness parameter value of pixels in the compressed frame. 8.The method according to claim 1, wherein said computing an intra-framequality score further comprises, calculating an added artifactual edgesscore that is based on quantifying an extent of added artifactual edgesalong a video coding block boundary of the candidate compressed framerelative to the current input frame, wherein the extent of addedartifactual edges is determined according to a behavior of pixel valuesacross video coding block boundaries in relation to a behavior of pixelvalues on either side of respective video coding block boundaries. 9.The method according to claim 8, wherein said calculating an addedartifactual edges score further comprises, normalizing the addedartifactual edges score according to an artifactual edges normalizationfactor that is based on the brightness parameter value and on adistribution of the extent of added artifactual edges.
 10. The methodaccording to claim 1, wherein said computing an intra-frame qualityscore further comprises, calculating a texture distortion score based onrelations between texture values in the current input frame and in thecorresponding candidate compressed frame, each texture valuecorresponding to a variance of pixel values within each one of aplurality of predefined pixel groups in the current input frame and ineach respective pixel group in the corresponding candidate compressedframe.
 11. The method according to claim 10, wherein said calculating atexture distortion score comprises applying one or more texturedistortion sensitivity thresholds to the relations between texturevalues in the current input frame and in the corresponding candidatecompressed frame, giving rise to a non-linear texture distortion scoremapping that is based on the texture distortion sensitivity thresholds.12. The method according to claim 11, wherein said applying one or moretexture distortion sensitivity thresholds includes adapting the one ormore texture distortion sensitivity thresholds according to thecalculated pixel-wise differences.
 13. The method according to claim 10,wherein said calculating a texture distortion score further comprises,normalizing the texture distortion score according to the brightnessparameter value and according to the artifactual edges normalizationfactor.
 14. The method according to claim 3, wherein said computing anintra-frame quality score further comprises: obtaining an edge mapcorresponding to the current input frame; for each edge pixel in thecurrent input frame providing an edge strength score based on adeviation between a value of an edge pixel and one or more pixels in theproximity of the edge pixel; for each corresponding pixel in thecandidate compressed frame providing an edge strength score based on adeviation between a value of the corresponding pixel and one or morepixels in the proximity of the corresponding pixel; and calculating anedge loss score based on a relation among the edge strength score of theedge pixel and the edge strength score of the corresponding pixel. 15.The method according to claim 1, wherein said computing an intra-framequality score further comprises: obtaining an edge map corresponding tothe current input frame; obtaining an edge map corresponding to thecandidate compressed frame; and calculating an edge loss score based ona loss of edge pixels according to a difference between the edge mapcorresponding to the current input frame and the edge map correspondingto the candidate compressed frame.
 16. The method according to claim 1,wherein said computing an intra-frame quality score further comprisesfactoring the intra-frame quality score based on a spatial distributionof pixel domain differences among the current input frame and thecandidate compressed frame.
 17. The method according to claim 16,wherein said computing an intra-frame quality score further comprises:for each candidate compressed frame tile, computing a tile spatialdistribution score based on a distribution among the pixel differencescores of the corresponding sub-tile pairs; for the candidate compressedframe, pooling the tile spatial distribution scores, giving rise to aframe spatial distribution score; and factoring the intra-frame qualityscore according to the frame spatial distribution score.
 18. The methodaccording to claim 1, wherein said providing a configuration instructioncomprises providing a configuration parameter that is related to arespective operation or asset of the video content system.
 19. Themethod according to claim 1, wherein said providing a configurationinstruction comprises providing an indication with regard to an extentof modification that is to be applied to the configuration of arespective operation or asset of the video content system.
 20. A devicefor controlling a video content system based on an input video sequenceand a corresponding degraded video sequence, the input video sequenceincluding at least a current input frame and a preceding input frame,and the degraded video sequence including at least a current degradedframe and a preceding degraded frame, the device comprising: aninterface configured to receive as input each of the current inputframe, the preceding input frame, the current degraded frame and thepreceding degraded frame; a processor configured to compute a firstdifferences value from the current input frame and the preceding inputframe, and a second differences value from the current degraded frameand the preceding degraded frame; a quality degradation evaluationmodule adapted to compare the first and the second differences values,giving rise to an inter-frame quality score; and said qualitydegradation evaluation module is adapted to compute an intra-framequality score using an intra-frame quality measure that is applied inthe pixel-domain of the current input frame and the current degradedframe; and a video content system configurator, configured to provide aconfiguration instruction to the video content system based on a qualitycriterion related to the inter-frame and the intra-frame quality scores;wherein the degraded video sequence is a compressed video sequencecorresponding to the input video sequence, and said device comprises: abuffer adapted to hold a preceding input frame and a precedingcompressed frame corresponding to the preceding input frame; andwherein: said video content system configurator is adapted to instruct avideo encoder to compress the current input frame according to acompression parameter value, giving rise to a candidate compressedframe; said interface is adapted to receive the current input frame andthe candidate compressed frame, said processor is configured to computea first differences value from the current input frame and precedinginput frame, and a second differences value from the candidatecompressed frame and the preceding compressed frame, said qualitydegradation evaluation module is adapted to compute an intra-framequality score using an intra-frame quality measure that is applied inthe pixel-domain for the candidate compressed frame and the currentinput frame; and said quality degradation evaluation module is adaptedto compare the first and second differences values giving rise to aninter-frame quality score, wherein in case a quality criterion relatedto inter-frame and intra-frame quality scores is not satisfied, said avideo content system configurator is adapted to instruct the videoencoder to repeat the video compression of the current input frame usingan updated compression parameter value, giving rise to an updatedcandidate compressed frame and computing the inter-frame quality scoreand the intra-frame quality score based on the updated candidatecompressed frame, and wherein the processor is further configured tocompute a frame quality score for the current input frame based on theintra-frame and the inter-frame quality scores, and wherein the qualitycriterion is related to the frame quality score.
 21. The deviceaccording to claim 20, further comprising a frame partitioning moduleadapted to partition each of the current input frame, the precedinginput frame, the candidate compressed frame and the stored compressedframe into two or more tiles, and wherein said processor is adapted to:calculate an intra-tile and an inter-frame quality score for each set ofcorresponding tiles; compute perceptually driven weights for theintra-tile and the inter-tile quality scores; and pool tile scores,giving rise to the frame quality score.
 22. The device according toclaim 21, further comprising a partitioning module that is adapted topartition a current input frame tile and a corresponding candidatecompressed frame tile, giving rise to a plurality of sub-tile pairs, andwherein said quality degradation evaluation module is adapted to:compute an intra sub-tile quality score for each one of the plurality ofsub-tile pairs; compute a perceptually driven weight for each one of theplurality of sub-tile pairs giving rise to a plurality of weighted intrasub-tile quality scores; and pool the plurality of weighted intrasub-tile quality scores into a corresponding plurality of intra-tilequality scores.
 23. The device according to claim 21, further comprisinga partitioning module that is adapted to partition each tile from a setof corresponding tiles consisting of: a current input frame tile, apreceding input frame tile, a candidate compressed frame tile and astored compressed frame tile into two or more sub-tiles, giving rise totwo or more sub-tile sets, and wherein, said quality degradationevaluation module is adapted to: compute an inter sub-tile score foreach of the two or more sub-tile sets; and pool the two or more intersub-tile scores into a corresponding inter-frame tile quality score. 24.The device according to claim 20, wherein said quality degradationevaluation module is adapted to use a full-reference pixel-domainquality measure to compute the intra-frame quality score, wherein theinput frame is a pixel domain reference.
 25. The device according toclaim 24, wherein said quality degradation evaluation module is adaptedto compute the intra-frame quality score based on a pixel-wisedifference between the input frame and the candidate compressed frame.26. The device according to claim 25, wherein said quality degradationevaluation module is adapted to normalize the intra-frame quality scorebased on a brightness parameter value of pixels in the compressed frame.27. The device according to claim 20, wherein said quality degradationevaluation module is adapted to calculate an added artifactual edgesscore that is based on quantifying an extent of added artifactual edgesalong a video encoding coding block boundary of the candidate compressedframe relative to the current input frame, wherein the extent of addedartifactual edges is determined according to a behavior of pixel valuesacross video coding block boundaries in relation to a behavior of pixelvalues on either side of respective video coding block boundaries, andwherein the intra-frame quality score is associated with the calculatedadded artifactual edges score.
 28. The device according to claim 27,wherein said quality degradation evaluation module is adapted tonormalize the added artifactual edges score according to an artifactualedges normalization factor that is based on the brightness parametervalue and on a distribution of the extent of added artifactual edges.29. The device according to claim 20, wherein said quality degradationevaluation module is adapted to compute a texture distortion score basedon relations between texture values in the current input frame and inthe corresponding candidate compressed frame, each texture valuecorresponding to a variance of pixel values within each one of aplurality of predefined pixel groups in the current input frame and ineach respective pixel group in the corresponding candidate compressedframe, and wherein the intra-frame quality score is associated with thecalculated texture distortion score.
 30. The device according to claim29, wherein said quality degradation evaluation module is adapted toapply one or more texture distortion sensitivity thresholds to therelations between texture values in the current input frame and in thecorresponding candidate compressed frame, giving rise to a non-lineartexture distortion score mapping that is based on the texture distortionsensitivity thresholds, and wherein said texture distortion score isassociated with the non-linear texture distortion score mapping.
 31. Thedevice according to claim 30, wherein said quality degradationevaluation module is adapted to adapt the one or more texture distortionsensitivity thresholds according to the calculated pixel-wisedifferences.
 32. The device according to claim 29, wherein said qualitydegradation evaluation module is adapted to normalize the texturedistortion score according to the brightness parameter value andaccording to the artifactual edges normalization factor.
 33. The deviceaccording to claim 20, wherein said quality degradation evaluationmodule is adapted to: obtain an edge map corresponding to the currentinput frame; obtain an edge map corresponding to the candidatecompressed frame; and calculate an edge loss score based on a loss ofedge pixels according to a difference between the edge map correspondingto the current input frame and the edge map corresponding to thecandidate compressed frame.
 34. The device according to claim 20,wherein said quality degradation evaluation module is adapted to factorthe intra-frame quality score based on a spatial distribution of pixeldomain differences among the current input frame and the candidatecompressed frame.
 35. The device according to claim 20, wherein saidquality degradation evaluation module is adapted to: compute a tilespatial distribution score for each candidate compressed frame tilebased on a distribution among the pixel difference scores of thecorresponding sub-tile pairs; and pool the tile spatial distributionscores for the candidate compressed frame, giving rise to a framespatial distribution score; and factoring the intra-frame quality scoreaccording to the frame spatial distribution score.
 36. The deviceaccording to claim 20, wherein said video content system configurator isadapted to provide a configuration instruction which includes aconfiguration parameter that is related to a respective operation orasset of the video content system.
 37. The device according to claim 20,wherein the configuration instruction indicates an extent ofmodification that is to be applied to the configuration of a respectiveoperation or asset of the video content system.
 38. A program storagedevice readable by machine, tangibly embodying a program of instructionsexecutable by the machine to perform a method of controlling acompression of a video frame from a video sequence to compress a videoframe from an input video sequence, the sequence comprising at least acurrent input frame and a preceding frame, the method comprising:providing a compression parameter value; obtaining a candidatecompressed frame generated from a current input frame according to thecompression parameter value; for each current input frame and candidatecompressed frame providing a stored compressed frame corresponding tothe preceding input frame; computing a first differences value from thecurrent input and the preceding input frames and a second differencesvalue from the candidate compressed frame and the stored compressedframe; comparing the first and second differences value giving rise toan inter-frame quality score; computing an intra-frame quality scoreusing an intra-frame quality measure that is applied in the pixel-domainof the candidate compressed frame and the current input frame; and incase a quality criterion related to inter-frame and intra-frame qualityis not satisfied, instructing the video encoder to repeat a compressionprocess using an updated compression parameter value giving rise to anupdated candidate compressed frame and computing the inter-frame qualityscore and the intra-frame quality score based on the updated candidatecompressed frame, wherein the degraded video sequence is a compressedvideo sequence corresponding to the input video sequence, wherein saidcomputing a first differences value comprises computing a firstdifferences value from the current input and the preceding input frames,and wherein said computing a second differences value comprisescomputing a second differences value from the candidate compressed frameand the stored compressed frame, and comparing the first and seconddifferences values giving rise to an inter-frame quality score; themethod further comprising computing a frame quality score for thecurrent candidate compressed frame based on the intra-frame and theinter-frame quality scores, and wherein the quality criterion is relatedto the frame quality score.
 39. A computer program product comprising anon-transitory computer useable medium having computer readable programcode embodied therein for controlling a compression of a video framefrom a video sequence to compress a video frame from an input videosequence, the sequence comprising at least a current input frame and apreceding frame, the computer program product comprising: computerreadable program code for causing the computer to provide a compressionparameter value; computer readable program code for causing the computerto obtain a candidate compressed frame generated from a current inputframe according to the compression parameter value; computer readableprogram code for causing the computer to for each current input frameand candidate compressed frame providing a stored compressed framecorresponding to the preceding input frame; computer readable programcode for causing the computer to compute a first differences value fromthe current input and the preceding input frames and a seconddifferences value from the candidate compressed frame and the storedcompressed frame; computer readable program code for causing thecomputer to compare the first and second differences value giving riseto an inter-frame quality score; computer readable program code forcausing the computer to compute an intra-frame quality score using anintra-frame quality measure that is applied in the pixel-domain of thecandidate compressed frame and the current input frame; and computerreadable program code for causing the computer to in case a qualitycriterion related to inter-frame and intra-frame quality is notsatisfied, instructing the video encoder to repeat a compression processusing an updated compression parameter value giving rise to an updatedcandidate compressed frame and computing the inter-frame quality scoreand the intra-frame quality score based on the updated candidatecompressed frame, wherein the degraded video sequence is a compressedvideo sequence corresponding to the input video sequence, wherein thecomputer readable code for computing a first differences value comprisescomputer readable code for computing a first differences value from thecurrent input and the preceding input frames, and wherein the computerreadable code for computing a second differences value comprisescomputer readable code for computing a second differences value from thecandidate compressed frame and the stored compressed frame, andcomparing the first and second differences values giving rise to aninter-frame quality score; and further comprising computer readable codefor computing a frame quality score for the current candidate compressedframe based on the intra-frame and the inter-frame quality scores, andwherein the quality criterion is related to the frame quality score.